#ot1-perplexing-regexing
1 messages · Page 97 of 1
I have 0 irl friends here though...
you'll make some as time goes by
I'm too awkward.
nice
convince? 💀
Also, carpal tunnel anyone? 🖐️
I sometimes get scared when my wrist feels weird.
Like right now
So I start waving it.
And it feels weirder
It's like a weird pain
Maybe not the best term, but I don't really like the doctor I have so I almost feel like I have to fake it a bit to actually get to somebody I can trust
the ghost tryna wave back
lol
i see
Kind of interesting reading that document (I got a copy as well),
viv has difficulty focusing... Etc etc
Typing too much?
probably
i'm scared
it's like ringing in your ear feeling
but it's a tingle
and it's in your wrist
and it sometimes hurts
mainly feels sours
like bittersour
ahh
Is the air heavy to breath?
You might be lacking oxygen
cant shift
umm
kinda
it always is tho
ahh my head
i shouldn't have changed positions 😭
I always get all tingly when I am running out of oxygen
This will sound incredibly weird
but it's like a tinglegasm
down my spine
And the sour pain in my wrist.
And more tingles in my chest
etc
You aren't cutting off circulation anywhere?
noh
hopefullt no
idk
My sitting position could have compressed my body
a tiny weeny bit
because nobody knows how to sit properly at home
i'm panicking
this doesnt help
my wrist nor the breathing
It's not like usual. It's like I'm getting normal breaths but also lacking them as well.
Sometimes holding my breath helps.
Open a window
But the a meter is defined as the distance light travels in 1/2999729458 seconds. Humans defined that
Get some fresh air
Metre?
okay
I mean the second and meter were defined before that using less precise definitions
bruh
yall are cia agents
no
Cant trust anyone these days smh
We switched to more precise ones though
Sure, but those are based on the imprecise ones
coincidence
No? The second is now defined w.r.t caesium vibrations
Meter w.r.t the second
I mean, we defined them in a way that would match the older models. We didn't completely change the length of a meter
Fair
Ahh.
Why did we "pick" 29999729458? Because that most closely matched the current model
Air.
It should probably be added in the next beta update.
Anyway. I've got to go pretend to sleep and stuff so that I don't get in trouble.
I'm going to get bashed for being on discord all day tomorrow.
Mother was wayy too quiet today.
Gn guys.

Good luck, soldier
good night
Gn
Gn
might have adhd as well
not diagnosed no health insurance too
:)
Please got to Vivziepops channel (the creator of Helluva Boss) and support them for the awesome work!
Vivziepop: https://www.youtube.com/c/SpindleHorse
helluva boss slaps
@timid latch is that error message good enough?.. (?<name> is a conditional block and has to be closed with ;)
I would say so, my errors are similar, let me cook one up
actually I have one atm as I havent implemented struct parsing yet:
i didnt think i'd be able to catch this type of errors, but right before i started making next block... i realised that i want to rewrite my "lookahead" function 💀
(function that searches for the corresponding symbol that closes the block)
and somehow it works, almost first try 🗣️
heres a error that is closer to what you had
first try ended up like this (was a simple logical error though, fixed in 2 seconds)
best way to share code
i hope nobody will pause to look at my goofy ahh code 💀
I swaped the order of two vars once and EVERYTHING broke
actually I can recreate it
💀
basically I swapped the order of the parent and sub types in the type system, so it was basically saying: "if the value is a subtype of the return type: error"
which leads to funny errors like "cant return 0..0 from functionn returning 0..255"
always love a good log
🤨

thats a lot of logs!
At least 2, for sure.
noisiest services
The... blog is #2?
ya it prob logs every request
whereas site only logs 404s
huh
@timid latch dataclasses are actually OP... (on the screenshot: all instructions are classes, and i didn't make __repr__ for any of them)
what does repr do again
returns a str that represents your object
Debug representation for objects
ohh okay
Fallback for if __str__ doesn't exist or when using repr()
if you'll look in the terminal on my screenshot, all of that got printed out just by using a simple for loop
for instruction in main.instruction_stack:
print(instruction)
print('=' * 64)
(and by default representation looks like <object Object at something>)
wait are you writing an interpretter for ur own language
i saw some video about it a few minutes ago
maybe you tried to print some object once and it printed out somewhat similiar to <object Object at something>
yeah!
mhm
thats sick dude goodluck
thank you! even though i already nearly finished it
ive doen pretty much every hard part
very impressive
here's what i've done right now
the repeat block (a [...])
in python it would be
for _ in range(a):
...
and here's the hello world 🤯
that's fun
https://vxtwitter.com/yukino_lr/status/1778391819732287492.mp4
Today's training 🥩
Skye having her dreads loosened by her grandson🐾
@timid latch well...... recursion... didn't go very well...
oof
Cat catcat
even had to build a debugger for that 😎
Nice
hi yall i like toasters. im cruising for my first star on github for some ropey python. (dopamine)
My nose bled when you sent that
Coincidence
😭
It's fine, I only choked on a bit of blood.
for me as well
like 6am or smth
same
anyways, check out the vid!! its cool!!! (🤯)
#python-discussion message
willy's chocolate experience
i like it 🙂
Question
When writing a compiler
Is it the tokenisers that’s difficult, the translation that’s difficult, or knowing assembly that’s difficult
I’m suspecting it’s the latter?
you dont need to know asm to write a compiler, you can compile to another language e.g. C
many compilers compile things down to JS e.g. typescript
Im writing this in C++
the "translation" part is acutally several different steps
Can I use C++ to translate to C++
welp, now you need to know asm i guess
Yup
I mean it’ll be fun
I’ll learn new things i would’ve probably never come across
pasrsing can get quite complicated
Part of the journey then
the book i studied on this topic in uni was the "dragon book" as everyone calls it
Why
Oh
one issue with the book that people sometimes mention that i can agree on is that it relies on BNF for the parser, you dont need to do that, you can learn parsing without that
its helpful to know, but might confuse some people 
I’ll try my best
good luck
This may be challenging
But
Idk kinda wanna make an impressive project to show off to Uni
I’ll feel great if I finish
I’ve made like
A prototype of this language of
*if
Fuck
Nevermind
But yeah
The syntax isn’t what I want to use in the C++ version but it was a good starting point
It was ASS
like the prototype code was atrocious
Actually is it possible to write the tokeniser in a separate language like JavaScript
Wait no
Nevermind
If I run this on C++, will I have to like
Make people install C++
To run this
Or can I create my own package manager
Am I yapping
why does using c++ stop you from translating to c++ 
Yoo
Hello
hi
I’m kinda new to this python thing
Could you give me tips cause I WANA be a game developer
you can check the pins in #game-development for resources
@indigo canyon There's a #game-development channel you can ask in. There are probably some really good resources listed in the pinned messages there.
jinx
Thxs
why use many word when few word do trick
You're welcome, good luck Slickstar
True
Thxs
thanks
well you can do that i guess 
C++++
when the maths github when the math

!e
String = "this is an Apple"
for word in String:
print(word)
those are characters you're printing, not words
Just got an amazing anime recommendation from ChatGPT
Never would have expected it, but I did try really hard in the conversation to point it in the right direction
Took about ~6 exchanges before the perfect match
I consider it amazing because I've watched over 200 already and I was afraid it'd suggest something I've already tried
CGPT is from now on my goto for show finding
what was the recommendation 😩
prefer toasters to anime, it all looks the same to me. caveat: am old.
@fringe rain bro spill
Bowling is going well
MP?
Me
I had to draw on a tiny phone screen okay
(also went ahead and missed 6 times more times in a row after that)
it was a ... bad round for me
put the guard rails on 😩
Wow... You all are... Not good
hey one person got 3 strikes in a row... somehow
I suggest you... Not quit your day job to take up bowling professionally
I wasnt planning to
I absolutely crush the gf every time we go bowling
ayo what
Or do any hand operated activity really
oh nvm
Strike first strike hard
No mercy
SKIBIDI TOILET IS RUINING MY LIFE
FRFR
I was trying to listen to Metros and Futures new Album and I shit you not, Skibidi Toilet was playing in my head the ENTIRE time.
#skibiditoilet #travisscott
I'm not the original creator of this song.
Original creator of the song @sleewa_random_music69
Original video https://youtu.be/E05S7yFjN7w?si=u2ntuMgzcmzt8NK9
Oh it was RE:Creator, but it was perfect for me - might not be the thing for you
Heres the convo; https://chat.openai.com/share/837199df-87a7-4b1e-9ca6-5ec57e818e8c
You read Steel Ball Run yet? Cuz that part gave me . . .Conniptions, but ONLY regarding stats.
otherwise it was literally perfection.
Oh i think i've seen the first couple eps on crunchyroll
Not really into it
lol
I think you did a misclick
It's fine
I've never watched Jojo's
Its okayish
I've never
Dont remember much
watched
When did you last watch it?
Yesterday maybe or a couple days ago
It was basically background noise
Idk maybe i should pay more attention
Yesterday 💀
I've forgotten what I did this morning
Yesterday didn't exist
April is all an April Fool's Joke.
The government is fooling us.
I sure hope it has been
Same
April has been rock bottom
Except I've got power tools, and it's just going down.
It indeed was a misclick + misread.
I was confused at first.
Didn't realise crunchyroll had a github.
Well... it doesn't matter.
Re:monster is boring. 
darn, i was planning to try that next
ngl the show probably isnt that great but not everything can be jjk
but its definitely watchable and entertaining which is a bit thing for me
Kekmao
for example, i couldnt watch eminence of shadow after a point even though its considered great by many
Yea my b
can't
no way
Well, I guess the development is better than some... questionable animes.
Anyway re:monster manga is pretty good
Yeah.
Oshi No Ko has dug a huge hole in my heart
The first episode in and I'm already rick rolled
but after the anime, which left out quite a bit from the manga, im into it again
did you watch the next episodes?
why is this labeled Haskell unemployment?
!topic
There are three off-topic channels:
The channel names change every night at midnight UTC and are often fun meta references to jokes or conversations that happened on the server.
See our off-topic etiquette page for more guidance on how the channels should be used.

I think it brings in some fun
And reminds us that PyDis staff are totally serious about their job all the time.
Yeah, it's weird, Julia seemed like a halfway house for when I was pissed off at Haskell community
I mean Julia community
I think it's a Lisp / Common Lisp issue, though
julia is very based
yeah
cat
last time i tried using it, it was terribly slow 
apparently i was trying to do a non array task and its better for arrays?
but tbf those are well documented and theres good profiling tools
i see
and then u get to enjoy dopamine hits from optimizing

this mf was legit a good villain
uhhh, so Frieren. You uuhhhh. . . caught up on the manga, or. . . ? ^^;
KungFu Panda 4 was actually really good
Definitely worth the watch
I was afraid it would be cringe cause it was targeted towards a younger audience, but it wasn't at all
You could tell it was made for a younger audience, but very well made nevertheless
Interesting and engaging, good movie
@fringe rain ive been thinking about you from am to pm, so i decided to dm 😉
rate the rizz ?/10
7/10, very good
3/10
doesn't everyone recommend salt water
Salt is generally very good for infections. Works on infected wounds as well, just bathe em in salt water for a bit.
dont listen to them i just poured salt crystals into an open wound IT DOES NOT HELP
i feel the need to add /s but i hope i dont have to
but its a programming discord server so
When it comes to an infected wound it paradoxically hurts less afterwards
Not throwing pure salt on it, you mix it in water. Hurts a bit, but not too bad imo.
alcohol is not ideal, actually, since it will disrupt your body's IR. just soap and water is fine
Would not recommend
Heya
You don't use alcohol in wounds. You wash em with salinated water.
Also, should be stated, I'm no doctor haha
Alcohol is good for killing bacteria on the skin, not in wounds
Definitely a good thing to know, you never know when you might need it
fire is better for that
You could prime the area with alcohol first just to be on the safe side though.
What if I want my limb to still work after the cleansing?
I'd say it sounds like you want to have your cake and eat it as well.
so you don't want your limbs or the cake?
I don't think we've seen the same medieval torture if that's what you think it is.
Medieval Historian Matt Lewis delves into the grisly details of medieval torture techniques. We cover everything from what it was like to be 'hung, drawn, and quartered' to the terrifying specialties of Vlad The Impaler. Matt explores the depths of human cruelty throughout the medieval period, offering a stark reminder of the barbarity that onc...
One of my favorite YouTube channels
great history content
Medieval torture has nothing on biblical torture anyways.
Scaphism is brutal.
.wa s scaphism
Failed to get response.
Probably a good thing
It's an ancient Egyptian thing.
two small boats, one inverted (on top) of the other
it's bury-them-near-an-anthill type of torture
savory cake
i feel personally harassed by the otn
You should message ModMail about it. Then the admins will gather around and snicker.
@high verge re: #python-discussion message
They're 'similar' in the sense that Korean and English are both phonetic (so each letter has a specific sound) but it's much more consistent in Korean
Other than that, they're more or less completely different (e.g. Korean combines letters to form characters, and each character is always 1 syllable)
hey
peek
Question
Is LLVM considered too heavyweight?
And also, is it possible to like
Well not possible
Is it recommended to write my own version of LLVM if I don’t want to use it and are there any alternatives
should I use Beam
JIT
Yeah but if you look at shit like rust
Compile time is slow
And that shit runs on LLVM
What’s numba
Oh
I’m looking for a more rapid alternative than LLVM
Not within the context of Python no
C++
Yeah
Wdym
No I’m not talking about compiling C++
I’m looking to make a programming language out of it
Oh
But it’s because rust is technically… I guess for a lack of better wording, at the mercy of LLVM
So LLVM should be technically fine right
Compile time shouldn’t be too much of a hassle?
Julia, Rust, and
Wdym by that
Ohh
Sure thing
Sounds like a good idea
What’s G++ btw
I kinda forgot
Only for CPP?
So is it like a LLVM for C++
Honestly real
Idk half the shit in reading most of the time
I should probably do some more in depth research
Before I go any further
Wouldn’t a interpreter be pretty difficult to write
If youre writing syntax for your language and something goes wrong whilst interpreting, you wouldn’t know if it was your code syntax that went wrong or if it was actually your interpreter code
I wanted to stick with compiled because if one wanted to build an app with my language they wouldn’t have to add “download the language” as a requirement
It can just be bundled into an executable
And also I actually need to give thought into what my coding language wants to achieve
Honestly this shit is for the university applications when the time comes
Yeah you’re right
I’ll do that
Ight Ight
What’re you thinking of making your language do
Oooh interesting
Something similar to Mojo
?
Oh
What about the syntax
Icic
Best of luck then man
llvm isn't the reason rust takes millenia to compile btw
the borrow checker has to check your dependencies as well
Oh
What’s a borrow checker again
the thing that allows you to write memory safe* code without a garbage collector or malloc-like functions
borrowck is one of the fast passes in rustc
Generally speaking rust code takes as long to compile as comparably complex c++
Iirc the linker is usually the bottleneck when profiled
Which is why there's interest in pre link time optimizations like pruning to simplify the linker's job
the other thing to note is that rust code often relies on lots of generics, to an extent that other languages rarely do, and there's no upper limit on how complex generic code can be nor can it be precompiled in dependencies
also, alternative linkers like mold
Indeed
Ah I see
So it is LLVM’s fault
Mhm mhm. This is all really useful, but I’m starting to wonder if compile time really is a huge deal
Like ik I go on and on abt it but
Surely when you execute the program it doesn’t mayter
Since it’s already been compiled?
Ah.
Mhm
Also a kind of separate question
When translating into machine code how do you create an executable file out of it
Oh
Should I include that when I write the compiler lol
Thanks
At least you honest LOL
Mhm
I’ll do more research
… I see…?
Mhm
But it doesn’t have the exe extension
And also doesn’t it write to an .o file
So I could just let the user do it
Actually nah that’s kinda annoying
Pffft
I guess I’ll just add something like chmod- okay now I regret leaving the rust discord server.
Gotta have to ask them how this exe magic works
I’m learning ASM
I’m a
Fucking idiot
i forgot linkers existed
Inheritance is legitimized code obfuscation
This is what's known as the "Stelercus inheritance is legitimized code obfuscation principal"
*principle
🏃
okden
Of legitimized code obfuscation
so "Stelercus [is] inheritance is legitimized code obfuscation['s] principal"
Sure
What is that anime?
Pong when you find out, I'm curious as well
Re:Creator
I consider it an amazing suggestion because
- It came from ChatGPT
- I havent watched it (Ive watched many, so i was expecting some mainstream recs)
- It filled my criteria that i specified perfectly (visually stunning and engaging)
https://chat.openai.com/share/837199df-87a7-4b1e-9ca6-5ec57e818e8c
Dunno if it felt motivated to bring about such a grand suggestion because I stroked its ego before stating my query first 🥴
Re:Creator is really good
My ass thought that was COTE
Definitely similar titles with the proverbs haha
anyone notice how sebastian lague's code is so readable
The ot name for this channel looks incredibly wrong
As bad as the font change discord made
I have all of his channel in watch later and I have watched none of his videos so far

anyone wanna help me out w/ the google sheets api using curl? i can read data and cell values by doing something like curl -s https://sheets.googleapis.com/v4/spreadsheets/$SHEET_ID/values/$SHEET_RANGE?key=$API_KEY but when you try to do a curl -s -X PUT -d '{"values":[["0"]]}' it fails with a 401 telling you to use credentials rather than api keys. Googles website suggests doing a curl -H "Authorization: Bearer $(gcloud auth print-access-token)" BUT i cant use gcloud its too big of an install being at like 1gb for the device im running this on. I only have 30mb open ram and 7mb open hdd space. Can I do this w/o gcloud application somehow?
i need to get that auth bearer somehow
Why curl and not e.g. Python and requests?
There are probably also libs that nicely handle Google api stuff without having to install gcloud
I have 30mb open ram and 7 MB open hdd space.
I must use built in os components or very miniscule packages
Python is massive my dude
You're in python discord, so you'll get python suggestions 🤷
If you have that little ram usable, I'd honestly first recommend cleaning the system
They're for python, and OP just said they don't want python.
If they want a Python answer they can open a help thread though.
Me: how do I use curl
You: use python
So helpful
You're on a Python Discord Araye.
I didn't say "use python", I said "why use curl when python could do that easier and clearer"
You're also asking for help in the equivalent of the break room.
You are worse than stack overflow memes
You answered why not python and I didn't pursue the topic, other than saying this might not be the best place
#tools-and-devops or #unix might be more suitable
They're also for python
The whole server beside ot channels are for python. Ot channels are for offtopic and that may include python
If one needs help with gcloud stuff, the best way would be to ask in a server related to google products (if it exists)
with that low an amount of free space, 10-20 files in /tmp might just lead your system to crash or halt due to running out of disk space
K?
I'd suggest using ncdu and weeding out what is taking up space, and remove the stuff you don't need first
I guarantee you have devices with just as little space
Its kind of what the world runs on
You have turned me this way.
^That's why I said cleaning the system would be a good idea. So little ram and free space is really weird especially for dealing with a massive api like Google api
I'll just come back in a few hours when dances isn't around smh
your presence is enough
But we don't use our fridges to use Google api
There's MicroPython but that's more of #microcontrollers thing than trying to fit editing Google api stuff on such small device
I could just leave.
what is the total amount of space you have? if you really are that short, try a lighter distro
The fridges access other apis tho.
(and no, I have plenty of free space)
I'm really too old to deal with Discord drama.
Curls are all you need
Your fridge your microwave your Alexa you everything do not.
But Google api requires an annoying auth that is hard to do manually with curl only
Well, I'm discovering that lol
they are stripped down a lot to ensure they don't just stop.
Idea:
- first make it work with whatever you can on normal computer, may be python and some libs that deal with gcloud api
- after it works, go through the lib's source and see how they handled the api, translate it to bash/sh and curl
- translate your own python code part into curl
With python it would be easier to make it work at all, like easily tying multiple requests together, taking cookies or headers from one thing and forwarding them to another thing, etc
Since doing both the "make it work" and "make it minimal/curl" at the same time is tricky
Fair
Adding a simple Google sheet update cell sh script won't break my fridge smh let me live in 2024 and do Google sheet work on my fridges microcontroller

That's a smart idea tho nicky
🤔
But even a lot of routers have just enough space and memory to run whatever is installed on them and nothing more. Like openwrt installs usually require a bit more than cheapest options if you want to add any extensions to the basic thing. So the original system router had, had to be super small as well
That "free" space or ram on any device you don't fully control might be for logs/temp files/ram spikes that sometimes happen but normally aren't there
That's why I'm not adding extensions
bouncing off of this, why not give the gcloud docs a read and find where it gets the auth token from in the first place?
aha
this may or may not work
do you have anything that is online 24/7 and is large enough for the gcloud cli?
No
That's why I'm using my fridge
It's always online
😎
Raspberry pis are so 2015
i think i may have found a way to get bearer w/ curl if it still works https://stackoverflow.com/a/72579959
Omg. I realised I haven't shown http://purrli.com/ to my current cat. That was nice, he investigated the phone and purred some as well.
But while I was writing this message, the catto decided he wants to play (maybe because we sometimes let him play with family cat of similar age) and started biting my toes. XD
even if it doesn't, whatever gcloud uses ought to be a public api (so libraries for programming languages can use it), so I'm sure you can find it with a little digging (unless there's an obfuscation method I'm unaware of that can make the api 100% invisible)
tis true
bro burnt the food
Why not Flatpakchat?
embed failure laugh at this user
You burned the kitchen down
Who let bro cook?
my fault team 😔
NativeChat
yo anyone know how to download pytorch on amd gpu
#data-science-and-ml might be of help, from a quick Google search, AMD has ROCm which is the equivalent of CUDA for NVIDIA but I couldn't find (or understand) how you'd go about installing it
(and pytorch has ROCm support)
!!!!!!
It's doing the thing!
okay, so i found my old sketchbook, here's an incomplete comic about the utah teapot
this place is going to devolve into an art section, im going to send a bunch of tech-related drawings
please do
teapot!
experimentation with crayons. the red guy is matsumoto from ruby.
artistic depiction of martin newell, the utah teapot guy
matsumoto of ruby and gosling of java
I really need to do more drawing, I have been thinking about making some comics
I made one and I did like it
these are so good @left imp !
thanks, i found my old sketchbook. i had 3, 2 are lost, 1 found today
one of the lost books had a ton of python drawings
heres the first comic I drew
Somehow that transformation looks painful
I'd hate it if my skin suddenly dissolved to something else
I mean, it was a pretty panicky few minutes
that looks great, reminds me of 2010s comic
Thanks!
this is the first time i use discord, and im already getting the hang of it
its like i learn fast. i picked up most of python in just 2 days
which is weird
Bad grammar is part of the joke
It must be an Airbus, because the "joke" flew over my head, whatever it is
Mfw i got 30gb data but cant use even 500mb because it downloads at 1KB/s
my friend once said something stupid,
"i fear of the future where companies make half-baked software, full of hidden bugs and vulnerable to many exploits. they will sell them as services, with the ridiculous pricing schemes, with the bright and colorful advertisement campaigns ingrained into every innocent minds."
No way my school blocked github
Complete the Cloud Skills Challenge: Fundamentals of Machine Learning! Great opportunity to learn new skills and techniques.
if your school has a coding class, they know what they're doing
My high school blocked just the CSS of GitHub for some reason
so like it'll load but look all weird
every school with computer know-how will do
The IT guy knows his stuff
@acoustic moss risky for experimental students or outsiders connected to the school net
why is it risky?
because they can download weird stuff? I suppose that's less of an issue if they're using like, a Chromebook
maybe don't have a shitty vulnerable network?
ez pz
guess what? kids are smart enough to copy-paste a whole project on github and claim it as their work
still, blocking isnt going to solve anything
I see the CSS comes from github.githubassets.com.
Seems they could have whitelisted github.com, but not the other?
Don't tell them that kids can also copy things out of books or you'll lose your school library too
You've clearly never worked for a school district.
They are consistently underfunded.
At least here in the US.
all in for the CSS naked day I see
cute duck
cat
gasp
he goof
rare non snow leopard pic
You can't tell because of the fur but it's making a rude gesture.
is it?
isnt that just a lynx
lynx lynx
Let's continue here @spare oriole @stoic stump
Rust isn't faster than c they can both be as fast
While some langs are usually slower then others, the source of slowdown is usually just how the program is written
You could argue rust makes it easier to write faster programs while staying sane
people always point at python for being slow but most of the time performance doesn't even matter in the slightest
and usually the ease of development just counteracts the fact that your unused app can only be used by 1 million not 2.5 million people at once or whatever
smth i like saying is that rust, c, python, etc... all behave the same when waiting for network/disk
if you're io bound you can't do much, yeah
if you're cpu bound, then it's another story
i am mortal coil bound
yeah but most of the time you're not computing enough for it to be cpu bound
and if you are then you look into it
it's just weird seeing people try to make something in a lower level language and take like 10x the time as if it was more higher level, with the same outcome
i like lower languages mostly because how much easier it is to run on someone else's pc you can just run a small exe instead of having them to install the correct python version or bundling it
!e
print([x for x in range(1000) if x%7==0])
!e
print([x for x in range(1000) if '3' in str(x)])
!e
stri="t h is do ens s"
print(len([x for x in stri if x==" "]))
!e
txt= "Yellow Yaks like yelling and yawning and yesturday they yodled while eating yuky yams"
print([x for x in txt if x.lower() not in ['a','e','i','o','u', ' ']])
!e
txt= "Yellow Yaks like yelling and yawning and yesturday they yodled while eating yuky yams"
print(set([x for x in txt if x.lower() not in ['a','e','i','o','u', ' ']]))
Get the index and the value as a tuple for items in the list “hi”, 4, 8.99, ‘apple’, (‘t,b’,’n’). Result would look like (index, value), (index, value)
!e
l=[“hi”, 4, 8.99, ‘apple’, ('t',b')]
print([(index,val) for index, val in enumerate l])
!e
l=["hi", 4, 8.99, 'apple', ('t',b')]
print([(index,val) for index, val in enumerate l])
!e
l=["hi", 4, 8.99, 'apple', ('t','b')]
print([(index,val) for index, val in enumerate l])
you forgot to call enumerate
enumerate(l)
!e
l=["hi", 4, 8.99, 'apple', ('t','b')]
print([(index,val) for index, val in enumerate( l)])
@agile mesa :white_check_mark: Your 3.12 eval job has completed with return code 0.
[(0, 'hi'), (1, 4), (2, 8.99), (3, 'apple'), (4, ('t', 'b'))]
Alrr got it thankss
you could do list(enumerate(l)), since you dont do anything in the listcomp
I was practising some list comp questions xd
Find the common numbers in two lists (without using a tuple or set) list_a = 1, 2, 3, 4, list_b = 2, 3, 4, 5
!e
list_a = [1, 2, 3, 4]
list_b = [2, 3, 4, 5]
print([x for x in list_a if x in list_b])
!e
g="In 1984 there were 13 instances of a protest with over 1000 people attending"
print([x for x in g if x.isdigit()])
@agile mesa :white_check_mark: Your 3.12 eval job has completed with return code 0.
['1', '9', '8', '4', '1', '3', '1', '0', '0', '0']
Given numbers = range(20), produce a list containing the word ‘even’ if a number in the numbers is even, and the word ‘odd’ if the number is odd. Result would look like ‘odd’,’odd’, ‘even’
@round pendant uhhh how do I print different items if x%2==0 else not
a if x%2==0 else b
(thats a ternary expression)
Wait how do I add this with the range function
its a single expression, you can use it in any place where you'd be able to use something like 1
x for x in range(20) "even" if x%2==0 else "odd"
?
!e
print([for x in range(20) "even" if x%2==0 else "odd"])
!e
print([for x in range(20) "even" if x%2==0 else "odd"])
!e
print([ "even" if x%2==0 else "odd" for x in range(20)])
@agile mesa :white_check_mark: Your 3.12 eval job has completed with return code 0.
['even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd', 'even', 'odd']
alrrre got it thanks
Produce a list of tuples consisting of only the matching numbers in these lists list_a = 1, 2, 3,4,5,6,7,8,9, list_b = 2, 7, 1, 12. Result would look like (4,4), (12,12)
!e
a = [1, 2, 3,4,5,6,7,8,9]
b= [2, 7, 1, 12]
print([(x,x) for x in a if x in b])
@agile mesa :white_check_mark: Your 3.12 eval job has completed with return code 0.
[(1, 1), (2, 2), (7, 7)]
Use a nested list comprehension to find all of the numbers from 1-1000 that are divisible by any single digit besides 1 (2-9)
Please use #bot-commands to run eval and don't spam an off topic channel
Alright
pretty cool right?
after 0:15 you can see some bodies orbiting a larger one
play it on 0.25x speed
why do they fly out?
the strength of gravitational attraction is inversely proportional to the square of distance, so the force starts out weak and increases fast as any masses approach each other. in some cases, this can produce an orbit, but usually, two objects hit each other. though, if you have more, the exact center of mass that everything is flying towards is not necessarily inside one of them, so the collision fails, and everything flies away
In fortnite terms; quick scopes and misses
alternatively, foot on the gas cause you're late or impatient, then you miss your turn and end up going way past it
inversely proportional to r²
please explain in subway surfers terms
splat
!rule 9 @violet breach
i am sorry
@sick nexus cute pfp
bruh, why are the dots going out of the graph?
For rendering and stable movement of bodies, i disabled dynamic bounds and set my own
You can render your own too
I wasn't expecting so many songs about Matty fucking Healy on TSwift's new album 😩
@young shoal have you listened to the new album? 👀
no >w<
Well it's a double sized album, so enjoy 31 songs!!
Florida!!! is a certified banger and I need TS and Florence to co-produce an entire album together
||no but seriously, why did Matty rat healy do so much damage in such a short amount of time jfc||
some people i know thought it was 💤
it's ok
there's a new album???
WHY SO MUCH CHANNELS HERE
Tortured Poets Department!!
true
guess I'll give it a listen
what's the vibe? similar to her recent albums?
I feel like it's evermore vibes mixed with midnights
Who's Afraid of Little Old Me is soooo good though
I see
But also someone needs to tell Jack Antonoff to do 10% less
i thought it was ok
tbh
kinda fell off
i liked i can do it with a broken heart though
maybe y'all just need to go through a heart wrenching breakup of a long term relationship >_>
no thanks
do what now?
who's anton 🥴
lmfao
hi
hi anton im dad
I got stuck again.
"With two sets, S = {x,y,z,a,b,c,d} and T = {1,2,3,4,5,6,7}, how many partial functions f : S -> T are there where f(x) is in {1,2,3,4}, f(y) is in {1,2,3,4}, f(z) is in {1,2,3,4}, and f(x) != f(y) != f(z)?"
from math import factorial as f
# permutation with replacement
def pr(n, r): return n**r
# permutation without replacement
def pnr(n, r): return f(n) / f(n - r)
# combination without replacement
def cnr(n, r): return f(n) / (f(r) * f(n - r))
# combination with replacement
def cr(n, r): return f(n + r - 1) / (f(r) * f(n - 1))
print(pnr(4, 3) * 4**8)
# expected: 98304
# result: 1572864
Why is this wrong?
Nevermind. It should have been 8**4.
what does fastboot mean on my phone
accidantly done it
fellt like this is a server where someone would know
it just says in red text: entering fastboot mode. . .
fuck it, let's have tuesdays off
I lvoe my WFH Tues/Thurs
Hello
function range(start: number, stop: number, step: number = 1): number[] {
let res: number[] = []
for (let index: number = start; index <= stop; index += step){
res = [...res, index]
}
return res
}
made this in typescript
i pro 😎
function avg(argument: number[]){
let sum: number = argument.reduce((x: number, y: number) => { return x + y })
return sum / argument.length
}
but why
function range(start: number, stop: number, step: number = 1): number[] {
let res: number[] = []
for (let index: number = start; index <= stop; index += step){
res = [...res, index]
}
return res
}
function avg(argument: number[]) {
let sum: number = argument.reduce((x: number, y: number) => { return x + y })
return sum / argument.length
}
function max(argument: number[]) {
return Math.max(...argument)
}
function min(argument: number[]) {
return Math.min(...argument)
}
function sum(argument: number[]) {
return argument.reduce((x: number, y: number) => { return x + y })
}
because I WANT PYTHON FUNCTIONS IN TYPESCRIPT !!!!!!!!!
why would you implement range like that
wut why
bruh
also its not a generator
range is probably the most useful one to have
But it could be as simple as Array(n).keys()
Or you could turn that into a gen if space is issue
It would be more useful if you implemented itertools stuff
wtf is a generator
you should make an actual Range class
your max and min aren't correct
they should support the 2 arg scenario like in python
!e print(min(3, 5))
@worldly ice :white_check_mark: Your 3.12 eval job has completed with return code 0.
3
Other people: If Sweater Weather is your favourite song, you're gay.
Me: ... uhh...
not my favourite but it's up there
🏃
Don't miss the outro
More like this:
https://youtu.be/hN6jVOcRtsQ (Take Me to Church)
https://youtu.be/G_WCfU64pHk (Young and Beautiful)

am handling computer science assignments
basically a list generated on demand
instead of entirety of it is generated once you call
whats a demand lmao
i still gotta learn english more
if you make a class in javascript you have to declare it as the ugliest way opssible... new CLASSSTUFF
that is not how it works bruh
wdymn declare it
yes it is
if you want to make it like python it needs to work for iterables and multiple args
fun or no
class Something{
print("h")
}
// HERES THE MOST DISGUSTING PART
something = new Something()
that's not a "JS" thing
it was in other OOP-like languages before it
now try using new with a function call in JS
(was used before classes existed)
C# moment
We probably had a fox visit during the night. But the fox wasn't a nice guest, decided to quickly eat and tried to grab food to-go.
The food is ducks.
2 ducks, only bones left of one, second is whole but dead - predator had problems carrying it through the fence...
this thing is still going lmaoooooooooo
huh
Idk JavaScript, so sorry if the quality is bad, but this would be more accurate I think. (Also ik that that's TypeScript)
class range {
constructor(start, stop, step = 1) {
this.start = start;
this.stop = stop;
this.step = step;
}
*[Symbol.iterator]() {
for (let i = this.start; i < this.stop; i += this.step) {
yield i;
}
}
}
let myrange = new range(1, 10, 1);
let arr = Array.from(myrange);
console.log(arr);
Well though message with a touch of care
varphi is the superior phi
imagine using varphi for totient
You don't need two strokes for the lefthand. Start at top, down to circle bit, full circle counterclockwise, down.
unorthodox
varphi is faster
Then you're making a varphi with extra steps. And you gotta stop to make it look like printed phi, while varphi is handwritten phi so it's smooth
Evolution. Yours is in the middle. You're halfway there
i see its resemblance to varphi now
It's evolution of printed vs handwritten (quick stroke, smooth, in this case top line is lost because it doesn't make much sense)
I like varphi because I think it looks better, not because it's easier to write
same
Update on the fox situation: the bait (the duck that fox killed yesterday but failed to carry) is gone, the trap is empty.
I think fox tried to get to the trap from the side and rolled it, then finally wrestled the bait out. Because only the trap's door is where the trap originally was, the trap itself is like 2m away
what does the fox say
i have bad news about how φ and ϕ look in my system font
i do use φ tho, it looks nicer in latex
gross what font is that
no idea actually. if that's really my system font it's ubuntu regular.
you are allowed to change fonts
i mean, i could. but to what?
Iosveka Term Nerd
comic sans
computer modern
comic neue
reptile is legitimately confused now
I would think that's system font then (also ubuntu)
theres latin and greek phi characters here, as well as mathematical font
@spare oriole wait are you spanish? #1230702344082165810 message
idk why but I like discovering people who talk my language
i speak spanish but i'm not from spain
LATAM
I mean I have a whole long list of things i need to spend my money on but if I had unlimited money... why the heck not that could be fun
@steady jacinth
let's go back to the original eqn
(2**n + 1)(2**-n + 1) = out, right?
let x = 2**n, and rewrite the equation in terms of x
1 + x + 1/x + 1 = out
you'll use later
it'll come in after you solve the quadratic
if you find x you'll able to find n
x**2 + 2x - out*x + 1 = 0
that is not what you should get
oh
still no
whats out here
try multiplying through by x first, and then moving everything to the left
just a variable
bro out for var
that a problem?
yes
k, so you can use the quadratic eqn
.latex
\[
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\]
no but the naming convention is bad as it confuses me
or in python terms x = (-b + (b**2 - 4*a*c)**0.5)/(2*a)?
oh yeah
give me a number that is not one more than a power of 2
I want to test something
6
7
ok phew my 2**n is not worthless
will those give the numbers in brackets in the original equation?
those will give the two values 2**n can be
and then you backsolve those to get the infinitely many complex values n can be
so this look right for the quadratic formula? ```py
def quadratic(a,b,c):
x = (-b + (b**2 - 4ac)0.5)/(2*a)
y = (-b - (b2 - 4ac)**0.5)/(2*a)
return x,y
yes
should be fine
I've forgotten what we were doing
now you solve 2**n = x and 2**n = y
you are computing the roots of that particular 2 degree equation
x,y = quadratic(1,2-out,1)
out, in this case, is an int, but out can be any complex you want
what are you actually doing this for? idk how you want to capture the infinitely many solutions
to find, for any number, 2 numbers such that xy = x+y = out
you can use SFFT
how did you get 2**n then
through testing
that equation is just equivalent to finding the 2 roots of x^2 - out*x + out = 0
!e
def f(out):
d = (out**2 - 4*out)**.5/2
x, y = out/2 + d, out/2 - d
return x, y
x, y = f(17)
print(x+y, x*y)
@crystal spruce :white_check_mark: Your 3.12 eval job has completed with return code 0.
17.0 16.999999999999996
