#ot1-perplexing-regexing

1 messages · Page 97 of 1

limpid lynx
#

i dont like socialising

strange blade
#

I have 0 irl friends here though...

limpid lynx
strange blade
#

I'm too awkward.

limpid lynx
#

nice

hearty vigil
#

convince? 💀

strange blade
#

Also, carpal tunnel anyone? 🖐️

limpid lynx
#

just no

strange blade
#

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

timid latch
# hearty vigil convince? 💀

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

limpid lynx
strange blade
#

lol

timid latch
#

Kind of interesting reading that document (I got a copy as well),

viv has difficulty focusing... Etc etc

strange blade
#

my wrist does feel weird though...

#

i don't like this feeling.

#

ouch

#

ahh

timid latch
strange blade
#

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

timid latch
#

Is the air heavy to breath?
You might be lacking oxygen

strange blade
#

cant shift

strange blade
#

kinda

#

it always is tho

#

ahh my head

#

i shouldn't have changed positions 😭

timid latch
#

I always get all tingly when I am running out of oxygen

strange blade
#

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

timid latch
#

You aren't cutting off circulation anywhere?

strange blade
#

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.

timid latch
#

Open a window

jovial oriole
#

But the a meter is defined as the distance light travels in 1/2999729458 seconds. Humans defined that

timid latch
#

Get some fresh air

strange blade
timid latch
strange blade
#

Ahh, It's 9:18 pm tho

#

that'll be so sus

strange blade
#

no

jovial oriole
#

Cant trust anyone these days smh

marble bay
strange blade
#

I'm not knowledgeable.

#

It's just my opinion.

timid latch
strange blade
#

coincidence

marble bay
#

Meter w.r.t the second

timid latch
marble bay
#

Fair

strange blade
#

Ahh.

timid latch
#

Why did we "pick" 29999729458? Because that most closely matched the current model

strange blade
#

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.

marble bay
hearty vigil
timid latch
#

Gn

marble bay
feral crown
#

might have adhd as well

#

not diagnosed no health insurance too

#

:)

undone thorn
#

helluva boss slaps

hearty vigil
#

@timid latch is that error message good enough?.. (?<name> is a conditional block and has to be closed with ;)

timid latch
#

actually I have one atm as I havent implemented struct parsing yet:

hearty vigil
#

and somehow it works, almost first try 🗣️

timid latch
#

heres a error that is closer to what you had

hearty vigil
hearty vigil
timid latch
#

I swaped the order of two vars once and EVERYTHING broke

#

actually I can recreate it

hearty vigil
timid latch
#

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"

bleak lintel
#

my logging is so great

#

i am the logging king

timid latch
#

always love a good log

bleak lintel
#

1.2 mil logs pumped into Loki

#

wait i lied

#

2.2 million

young shoal
#

🤨

carmine apex
bleak lintel
#

thats a lot of logs!

thick osprey
#

At least 2, for sure.

bleak lintel
#

noisiest services

vale raven
bleak lintel
#

whereas site only logs 404s

vale raven
#

huh

hearty vigil
#

@timid latch dataclasses are actually OP... (on the screenshot: all instructions are classes, and i didn't make __repr__ for any of them)

hybrid pivot
#

what does repr do again

hearty vigil
wicked haven
hybrid pivot
#

ohh okay

wicked haven
#

Fallback for if __str__ doesn't exist or when using repr()

hybrid pivot
#

i still dont get it but ill look it up soon

#

ty

hearty vigil
# hybrid pivot ohh okay

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>)

hybrid pivot
#

wait are you writing an interpretter for ur own language

#

i saw some video about it a few minutes ago

hearty vigil
#

maybe you tried to print some object once and it printed out somewhat similiar to <object Object at something>

hybrid pivot
hearty vigil
#

ive doen pretty much every hard part

hybrid pivot
#

very impressive

hearty vigil
#

the repeat block (a [...])
in python it would be

for _ in range(a):
    ...
fresh basalt
lament cairn
lament cairn
hearty vigil
strange blade
#

oof

foggy jungle
strange blade
#

hilarious

#

🥲

hearty vigil
strange blade
#

Nice

rough sapphire
#

hi yall i like toasters. im cruising for my first star on github for some ropey python. (dopamine)

strange blade
#

Coincidence

hearty vigil
strange blade
hearty vigil
#

recursion works 😭

strange blade
#

It's morning for them right now.

#

So maybe lay down on the pings

hearty vigil
#

for me as well

strange blade
#

like 6am or smth

hearty vigil
#

same

strange blade
#

ahh

#

you need rest

hearty vigil
#

well... 💀

#

i think im gonna have it now

hearty vigil
lament cairn
lament cairn
onyx mist
#

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?

glossy niche
#

many compilers compile things down to JS e.g. typescript

glossy niche
#

the "translation" part is acutally several different steps

onyx mist
#

Can I use C++ to translate to C++

glossy niche
onyx mist
#

I mean it’ll be fun

#

I’ll learn new things i would’ve probably never come across

glossy niche
onyx mist
glossy niche
#

the book i studied on this topic in uni was the "dragon book" as everyone calls it

glossy niche
#

because it has a dragon on its cover

onyx mist
#

Oh

glossy niche
#

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 pithink

onyx mist
#

I’ll try my best

glossy niche
#

good luck

onyx mist
#

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

onyx mist
#

Am I yapping

high shadow
#

I don’t think so

small coral
#

originally sent at :56

#

okay

#

why does discord work for me here

acoustic moss
indigo canyon
#

Yoo

acoustic moss
#

hi

indigo canyon
#

I’m kinda new to this python thing

indigo canyon
acoustic moss
fresh basalt
#

@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

acoustic moss
#

why use many word when few word do trick

fresh basalt
#

You're welcome, good luck Slickstar

indigo canyon
indigo canyon
hearty vigil
glossy niche
#

C++++

mental violet
#

when the maths github when the math

rough sapphire
void hamlet
#

!e

String = "this is an Apple"
for word in String:
print(word)

cobalt remnant
#

those are characters you're printing, not words

fringe rain
#

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

gritty zinc
#

what was the recommendation 😩

tardy rain
#

waiting for it too

#

inb4 yet another isekai

gritty zinc
#

what's the anime equivalent of rickrolling

#

inb4 school days

tardy rain
#

nichijou?

#

i have no clue

#

probably a jojo season

rough sapphire
#

prefer toasters to anime, it all looks the same to me. caveat: am old.

tardy rain
#

@fringe rain bro spill

timid latch
#

Bowling is going well

young shoal
#

MP?

timid latch
#

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

young shoal
#

put the guard rails on 😩

timid latch
#

I did for the second round

#

I used up all my luck on that spare

eternal depot
timid latch
eternal depot
timid latch
#

I wasnt planning to

tardy rain
#

I absolutely crush the gf every time we go bowling

grave cove
#

ayo what

tardy rain
#

Or do any hand operated activity really

grave cove
#

oh nvm

tardy rain
#

Strike first strike hard
No mercy

rough sapphire
#

SKIBIDI TOILET IS RUINING MY LIFE

exotic marten
#

FR

rough sapphire
#

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.

rough sapphire
rough sapphire
fringe rain
rough sapphire
#

otherwise it was literally perfection.

tardy rain
#

Not really into it

strange blade
#

lol

strange blade
#

It's fine

#

I've never watched Jojo's

tardy rain
#

🤨

#

Im talking about re;monster

strange blade
#

ahh

#

And

tardy rain
#

Its okayish

strange blade
#

I've never

tardy rain
#

Dont remember much

strange blade
#

watched

strange blade
#

Yup

strange blade
tardy rain
#

Yesterday maybe or a couple days ago

#

It was basically background noise

#

Idk maybe i should pay more attention

strange blade
#

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.

tardy rain
#

I sure hope it has been

strange blade
#

Same

#

April has been rock bottom

#

Except I've got power tools, and it's just going down.

fringe rain
#

🥴

tardy rain
#

What

#

Did i get it wrong

strange blade
#

Ahh

#

So I was correct

strange blade
#

I was confused at first.

#

Didn't realise crunchyroll had a github.

#

Well... it doesn't matter.

#

Re:monster is boring. thumbs_up

fringe rain
#

darn, i was planning to try that next

tardy rain
#

Oh, i did get it wrong

fringe rain
#

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

tardy rain
#

Kekmao

fringe rain
#

for example, i couldnt watch eminence of shadow after a point even though its considered great by many

tardy rain
#

Yea my b

strange blade
#

no way

#

Well, I guess the development is better than some... questionable animes.

tardy rain
#

Anyway re:monster manga is pretty good

strange blade
#

Yeah.

fringe rain
#

im planning to read oshi no ko manga

#

well technically i alr did

strange blade
#

Oshi No Ko has dug a huge hole in my heart

#

The first episode in and I'm already rick rolled

fringe rain
#

but after the anime, which left out quite a bit from the manga, im into it again

fringe rain
strange blade
#

I did

#

It made me happier.

#

But I swear. Fattest rick roll of my life.

stark rivet
#

why is this labeled Haskell unemployment?

strange blade
royal lakeBOT
stark rivet
#

sort of odd

#

I'm hanging around with Julia community these days

strange blade
#

I think it brings in some fun

#

And reminds us that PyDis staff are totally serious about their job all the time.

stark rivet
#

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

acoustic moss
#

julia is very based

rough sapphire
#

yeah

lament cairn
jaunty wraith
#

cat

glossy niche
#

apparently i was trying to do a non array task and its better for arrays?

acoustic moss
#

what were u doing

#

ime its very easy to do something the slow way in julia

glossy niche
#

trying to solve a convoluted group theory problem

#

combinatorics

acoustic moss
#

but tbf those are well documented and theres good profiling tools

acoustic moss
#

and then u get to enjoy dopamine hits from optimizing

glossy niche
#

sounds like a bad language design to me

#

gets the optimization addicts all riled up

glossy niche
glossy niche
rough sapphire
fringe rain
#

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

limpid lynx
#

@fringe rain ive been thinking about you from am to pm, so i decided to dm 😉

#

rate the rizz ?/10

fringe rain
#

7/10, very good

rough sapphire
#

3/10

lime maple
young shoal
#

doesn't everyone recommend salt water

floral viper
#

Salt is generally very good for infections. Works on infected wounds as well, just bathe em in salt water for a bit.

green pelican
#

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

floral viper
#

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.

tardy rain
#

You can

#

Gargle TCP

young shoal
#

alcohol is not ideal, actually, since it will disrupt your body's IR. just soap and water is fine

tardy rain
#

Would not recommend

flint ginkgo
#

Heya

floral viper
#

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

fresh basalt
#

You could prime the area with alcohol first just to be on the safe side though.

vale raven
fresh basalt
#

I'd say it sounds like you want to have your cake and eat it as well.

fresh basalt
#

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.

fresh basalt
#

One of my favorite YouTube channels

#

great history content

#

Medieval torture has nothing on biblical torture anyways.

#

Scaphism is brutal.

vale raven
#

.wa s scaphism

median domeBOT
vale raven
#

Probably a good thing

fresh basalt
#

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

round pendant
#

i feel personally harassed by the otn

fresh basalt
#

You should message ModMail about it. Then the admins will gather around and snicker.

primal herald
#

@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)

lament cairn
grave cove
#

peek

onyx mist
#

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

onyx mist
#

should I use Beam

onyx mist
#

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

marble bay
#

the borrow checker has to check your dependencies as well

onyx mist
#

What’s a borrow checker again

marble bay
#

the thing that allows you to write memory safe* code without a garbage collector or malloc-like functions

sharp jasper
#

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

jaunty wraith
sharp jasper
#

Indeed

lament cairn
onyx mist
#

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

onyx mist
#

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

frozen crane
#

Inheritance is legitimized code obfuscation

#

This is what's known as the "Stelercus inheritance is legitimized code obfuscation principal"

frozen crane
#

No

#

I'm the principal

marble bay
#

okden

frozen crane
#

Of legitimized code obfuscation

marble bay
#

so "Stelercus [is] inheritance is legitimized code obfuscation['s] principal"

frozen crane
#

Sure

fringe rain
harsh tundra
#

What is that anime?

paper sequoia
#

Pong when you find out, I'm curious as well

fringe rain
#

Dunno if it felt motivated to bring about such a grand suggestion because I stroked its ego before stating my query first 🥴

graceful basin
#

Re:Creator is really good

onyx mist
fringe rain
thick ore
#

anyone notice how sebastian lague's code is so readable

strange blade
#

The ot name for this channel looks incredibly wrong

#

As bad as the font change discord made

glossy niche
rare sapphire
full needle
#

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

harsh tundra
full needle
#

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

harsh tundra
#

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

fresh basalt
#

You can open up a help thread

harsh tundra
fresh basalt
#

If they want a Python answer they can open a help thread though.

full needle
fresh basalt
#

You're on a Python Discord Araye.

harsh tundra
fresh basalt
#

You're also asking for help in the equivalent of the break room.

full needle
#

You are worse than stack overflow memes

harsh tundra
#

You answered why not python and I didn't pursue the topic, other than saying this might not be the best place

fresh basalt
harsh tundra
#

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)

marble bay
#

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

full needle
#

K?

marble bay
#

I'd suggest using ncdu and weeding out what is taking up space, and remove the stuff you don't need first

full needle
#

I guarantee you have devices with just as little space

#

Its kind of what the world runs on

fresh basalt
#

What's that got to do with anything?

#

You are rather abrasive.

full needle
harsh tundra
full needle
#

I'll just come back in a few hours when dances isn't around smh

fresh basalt
#

What?

#

I didn't do anything.

young shoal
harsh tundra
fresh basalt
#

I could just leave.

marble bay
full needle
marble bay
#

(and no, I have plenty of free space)

fresh basalt
#

I'm really too old to deal with Discord drama.

full needle
#

Curls are all you need

full needle
harsh tundra
full needle
marble bay
harsh tundra
# full needle Well, I'm discovering that lol

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

full needle
#

Fair

full needle
#

That's a smart idea tho nicky

marble bay
#

🤔

harsh tundra
#

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

full needle
#

That's why I'm not adding extensions

marble bay
full needle
#

Curl is built in

#

And a sh text file is like 1kb

#

So the 7mb open space is enough

marble bay
#

aha

#

this may or may not work

#

do you have anything that is online 24/7 and is large enough for the gcloud cli?

full needle
#

No

#

That's why I'm using my fridge

#

It's always online

#

😎

#

Raspberry pis are so 2015

marble bay
#

🤷

#

I'm all out of ideas then

full needle
harsh tundra
#

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

Not just a cat purr, but a cat purring next to you. Purrli purrfectly recreates the sound and the presence of a cat, online.

marble bay
full needle
#

tis true

jovial oriole
#

Are we cooking chat?

grave cove
#

bro burnt the food

vale raven
#

"Snapchat"

#

turns monitor away from door

cobalt remnant
#

Why not Flatpakchat?

vocal oyster
reef goblet
rough sapphire
#

Who let bro cook?

grave cove
#

my fault team 😔

marble bay
sacred galleon
#

yo anyone know how to download pytorch on amd gpu

marble bay
#

(and pytorch has ROCm support)

lament cairn
#

!!!!!!
It's doing the thing!

left imp
#

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

timid latch
#

please do

lament cairn
#

teapot!

left imp
#

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

timid latch
#

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 !

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

timid latch
strange blade
#

Somehow that transformation looks painful

#

I'd hate it if my skin suddenly dissolved to something else

timid latch
strange blade
#

heh

#

mental pain

left imp
timid latch
left imp
#

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

cobalt remnant
strange blade
jovial oriole
#

Mfw i got 30gb data but cant use even 500mb because it downloads at 1KB/s

signal ore
#

Guys

#

Anyone wanna play battleship withme ?

left imp
#

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."

jovial oriole
#

No way my school blocked github

glass stratus
left imp
grave cove
#

My high school blocked just the CSS of GitHub for some reason

#

so like it'll load but look all weird

rough sapphire
#

The IT guy knows his stuff

acoustic moss
#

huh

#

why block github

rough sapphire
#

@acoustic moss risky for experimental students or outsiders connected to the school net

low chasm
#

because they can download weird stuff? I suppose that's less of an issue if they're using like, a Chromebook

lament cairn
#

ez pz

left imp
#

still, blocking isnt going to solve anything

lament cairn
#

Unless the school has their own git server

#

which then : + 1:

steady hound
sharp jasper
fresh basalt
#

They are consistently underfunded.

#

At least here in the US.

lament cairn
limpid lynx
jaunty wraith
solemn tulip
#

gasp

grave cove
glossy niche
#

could have been the perfect creature

lament cairn
lament cairn
#

rare non snow leopard pic

fresh basalt
lament cairn
#

is it?

severe wadi
lament cairn
#

ys

#

a lynx

alpine tusk
#

lynx lynx

zealous comet
#

Let's continue here @spare oriole @stoic stump

#

Rust isn't faster than c they can both be as fast

timid latch
#

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

vocal oyster
#

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

lament cairn
#

smth i like saying is that rust, c, python, etc... all behave the same when waiting for network/disk

solemn tulip
#

if you're cpu bound, then it's another story

tardy rain
#

i am mortal coil bound

vocal oyster
#

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

zealous comet
#

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

lament cairn
agile mesa
#

!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])

round pendant
#

you forgot to call enumerate

agile mesa
#

Wdym

#

Oh

#

Wait

spare oriole
#

enumerate(l)

agile mesa
#

!e
l=["hi", 4, 8.99, 'apple', ('t','b')]
print([(index,val) for index, val in enumerate( l)])

royal lakeBOT
#

@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'))]
agile mesa
#

Alrr got it thankss

round pendant
#

you could do list(enumerate(l)), since you dont do anything in the listcomp

agile mesa
#

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()])

royal lakeBOT
#

@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']
agile mesa
#

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

round pendant
#
a if x%2==0 else b

(thats a ternary expression)

agile mesa
#

Wait how do I add this with the range function

round pendant
#

its a single expression, you can use it in any place where you'd be able to use something like 1

agile mesa
#

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)])

royal lakeBOT
#

@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']
agile mesa
#

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])

royal lakeBOT
#

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

[(1, 1), (2, 2), (7, 7)]
agile mesa
#

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)

honest star
#

Please use #bot-commands to run eval and don't spam an off topic channel

agile mesa
#

Alright

jovial oriole
#

after 0:15 you can see some bodies orbiting a larger one

#

play it on 0.25x speed

agile yacht
#

why do they fly out?

carmine apex
#

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

jovial oriole
#

In fortnite terms; quick scopes and misses

carmine apex
#

alternatively, foot on the gas cause you're late or impatient, then you miss your turn and end up going way past it

brazen ingot
acoustic moss
carmine apex
karmic gust
#

!rule 9 @violet breach

royal lakeBOT
#

9. Do not offer or ask for paid work of any kind.

violet breach
#

i am sorry

steady jacinth
#

@sick nexus cute pfp

rough sapphire
jovial oriole
#

You can render your own too

honest star
#

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? 👀

young shoal
#

no >w<

honest star
#

Well it's a double sized album, so enjoy 31 songs!!

young shoal
#

🥴

#

omg fortnite

#

🤩

honest star
#

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||

young shoal
#

some people i know thought it was 💤

low chasm
#

there's a new album???

acoustic moss
#

same

#

i listened to some

#

not particularly blown away by any ngl

limber turret
#

WHY SO MUCH CHANNELS HERE

honest star
young shoal
low chasm
#

what's the vibe? similar to her recent albums?

honest star
#

I feel like it's evermore vibes mixed with midnights

#

Who's Afraid of Little Old Me is soooo good though

honest star
#

But also someone needs to tell Jack Antonoff to do 10% less

young shoal
#

tbh

#

kinda fell off

#

i liked i can do it with a broken heart though

honest star
#

maybe y'all just need to go through a heart wrenching breakup of a long term relationship >_>

young shoal
#

no thanks

young shoal
#

who's anton 🥴

acoustic moss
#

lmfao

solemn tulip
acoustic moss
#

hi anton im dad

buoyant hill
#

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.

teal coral
#

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. . .

jovial oriole
grave cove
#

fuck it, let's have tuesdays off

surreal otter
#

I lvoe my WFH Tues/Thurs

polar vigil
#

Hello

idle elbow
#
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
}
tardy rain
#

but why

idle elbow
# tardy rain 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 !!!!!!!!!

tardy rain
#

why would you implement range like that

idle elbow
tardy rain
#

cause thats terrible lol

#

at least use push

idle elbow
#

bruh

tardy rain
#

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

idle elbow
#

wtf is a generator

worldly ice
worldly ice
#

they should support the 2 arg scenario like in python

#

!e print(min(3, 5))

royal lakeBOT
#

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

3
strange blade
strange blade
strange blade
latent juniper
#

am handling computer science assignments

naive igloo
#

instead of entirety of it is generated once you call

idle elbow
#

i still gotta learn english more

idle elbow
idle elbow
worldly ice
#

if you want to make it like python it needs to work for iterables and multiple args

brazen ingot
idle elbow
worldly ice
#

it was in other OOP-like languages before it

#

now try using new with a function call in JS

#

(was used before classes existed)

fringe rain
#

IIRC something like that was in C++ too

#

But I could be wrong, I don't use C++

tranquil orchid
#

C# moment

harsh tundra
#

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...

south nacelle
#

this thing is still going lmaoooooooooo

lament cairn
#

huh

south nacelle
#

freedom of form foundation is trying to make furries real

#

it is incredibly based

mental isle
# idle elbow ```ts function range(start: number, stop: number, step: number = 1): number[] { ...

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);
glossy niche
#

copeilot

grave cove
#

bro is cooking (literally)

polar vigil
brazen ingot
crystal spruce
#

varphi is the superior phi

brazen ingot
#

imagine using varphi for totient

soft violet
#

You don't need two strokes for the lefthand. Start at top, down to circle bit, full circle counterclockwise, down.

strange blade
#

varphi is faster

harsh tundra
harsh tundra
small coral
harsh tundra
#

It's evolution of printed vs handwritten (quick stroke, smooth, in this case top line is lost because it doesn't make much sense)

crystal spruce
#

I like varphi because I think it looks better, not because it's easier to write

brazen ingot
#

same

harsh tundra
#

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

limpid lynx
#

what does the fox say

gritty zinc
#

i do use φ tho, it looks nicer in latex

brazen ingot
gritty zinc
#

no idea actually. if that's really my system font it's ubuntu regular.

brazen ingot
#

you are allowed to change fonts

gritty zinc
#

i mean, i could. but to what?

brazen ingot
#

Iosveka Term Nerd

acoustic moss
#

comic sans

young shoal
#

computer modern

strange blade
#

comic neue

brazen ingot
#

reptile is legitimately confused now

vocal oyster
#

theres latin and greek phi characters here, as well as mathematical font

cursive salmon
#

idk why but I like discovering people who talk my language

spare oriole
#

LATAM

smoky meadow
crystal spruce
#

@steady jacinth

#

let's go back to the original eqn

#

(2**n + 1)(2**-n + 1) = out, right?

steady jacinth
#

(2**n + 1)(2**-n+1) = out

#

yeah

crystal spruce
#

let x = 2**n, and rewrite the equation in terms of x

steady jacinth
#

(x+1)(1/x + 1) = out

#

I think

crystal spruce
#

right

#

now expand

steady jacinth
#

1 + x + 1/x + 1 = out

crystal spruce
#

yep

#

gather everything on the left and multiply through by x

steady jacinth
#

wait is my whole 2**n thing unneccesary?

#

anyway

brazen ingot
crystal spruce
#

it'll come in after you solve the quadratic

brazen ingot
#

if you find x you'll able to find n

steady jacinth
crystal spruce
#

that is not what you should get

steady jacinth
#

oh

crystal spruce
#

still no

brazen ingot
#

whats out here

crystal spruce
#

try multiplying through by x first, and then moving everything to the left

#

just a variable

brazen ingot
#

bro out for var

steady jacinth
crystal spruce
#

k that's right

#

now do you see that that's quadratic in x?

steady jacinth
#

yes

crystal spruce
#

k, so you can use the quadratic eqn

#

.latex

\[
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\]
median domeBOT
brazen ingot
steady jacinth
# median dome

or in python terms x = (-b + (b**2 - 4*a*c)**0.5)/(2*a)?

crystal spruce
#

/(2*a) at the end

#

you'll want both roots

steady jacinth
#

oh yeah

steady jacinth
#

I want to test something

crystal spruce
#

6

brazen ingot
#

7

steady jacinth
#

ok phew my 2**n is not worthless

steady jacinth
crystal spruce
#

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

steady jacinth
brazen ingot
#

yes

crystal spruce
#

should be fine

steady jacinth
#

I've forgotten what we were doing

crystal spruce
#

now you solve 2**n = x and 2**n = y

brazen ingot
#

you are computing the roots of that particular 2 degree equation

steady jacinth
brazen ingot
#

works

#

but out is defined as a int or something else?

steady jacinth
#

out, in this case, is an int, but out can be any complex you want

crystal spruce
steady jacinth
brazen ingot
#

you can use SFFT

crystal spruce
#

how did you get 2**n then

steady jacinth
crystal spruce
#

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)
royal lakeBOT
#

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

17.0 16.999999999999996