#ot1-perplexing-regexing

1 messages · Page 538 of 1

twin charm
#

since its vishu and its tradition for parents to give their kids money 🤣

low chasm
#

Oh lmao

twin charm
#

a smol festival

low chasm
#

Cool,

#

all the money

wary spire
#

16 gig ram, prebuilt hdd and core, and a Nvidia gtx 750
On a Dell inspiron 3670

last mantle
#

damn a 750

low chasm
#

Cool

twin charm
#

I got 200 rupees last year

low chasm
#

I have a prebuilt aswell

low chasm
wary spire
#

750 is old af

last mantle
#

does the 750 perform well now?

wary spire
#

I got it from my dads part box

twin charm
#

I think I'll raise enough money to buy a mouse

low chasm
#

I have 16gb ram, 256gb ssd, 1tg hdd, and a gtx 1660 super 6gb

low chasm
twin charm
wary spire
low chasm
#

Alright, mouse are nice

wary spire
#

not bad

#

But not great

twin charm
#

mice I guess

#

idk I'm not a native english speaker 🥴

wary spire
#

Lol

#

Mice is plural

#

Mouse is singular

low chasm
wary spire
#

Lol

low chasm
#

Lol

wary spire
#

GO LATIN

#

lol

low chasm
#

ditch english

wary spire
#

Yep

#

Too bad they dont offer Latin as a system language

low chasm
#

What are you guys working on atm?

#

In terms of projects

wary spire
#

Erm

#

Random stuff

low chasm
#

Cool

wary spire
#

My rickroll detector

low chasm
#

I'm making a programming language :D

wary spire
#

Oh wow

twin charm
#

madlad 💯

low chasm
#

It cant do much except basic printing and addition/subtraction though

wary spire
#

Yooooo

low chasm
#

Async support :D

twin charm
#

cool cool.

wary spire
#

Cant load it lmao

#

Wofi wont load the page

low chasm
#

Oh lol

rough sapphire
#

anyone want a custom logo?

twin charm
low chasm
#

Not the theming though

twin charm
#

did it take more time to write the docs than to actually make it

twin charm
low chasm
#

Well, I didn't theme it, its just normal markdown pages

#

I used mkdocs to do it for me

twin charm
#

got it.

safe bridge
#

new server picture pog

low chasm
#

Lol yeah

narrow pecan
low chasm
#

Thanks :D

last mantle
#

@narrow pecan do you do ML

narrow pecan
#

Not really

last mantle
#

oh okay

acoustic moss
narrow pecan
#

It’s a really interesting subject, though. I like 3b1b’s series about it

#

He takes a very intuitive and visual approach to explaining the concepts behind it

acoustic moss
#

oh yeah

#

3b1b's neural network videos are the first of his videos i watched

last mantle
#

imma try ML from june

low chasm
#

ML is cool

#

I did nltk a few months ago

inland wolf
#

3b1b explains very well

#

and his animations are good

#

like really good

low chasm
#

Cool, I'll probably check him out sometime

inland wolf
#

he has a cool video on cryptocurrencies

sterile sapphire
#

can we please end CW shows

#

Flash sucks

#

Supergirl or what not is ending

last mantle
#

indeed

sterile sapphire
#

Riverdale

#

we don't talk about that

#

it's just garbage CW shows are just pep talks and then they beat the villain

low chasm
#

lmfao

sterile sapphire
#

that is like the pattern to every episode

#

Barry tells his team oh I'm not fast enough

low chasm
#

Most of those shows got boring after a while

sterile sapphire
#

and then his team gives him some tech

#

and then a pep talk

low chasm
#

Mhm

sterile sapphire
#

and then he beats the villain

#

yayyyy

low chasm
#

And magically, insane speed

sterile sapphire
#

oh oh oh

#

don't forget the arcs where he loses his speed

#

oh no

#

I wonder what's going to happen? it's not like he's going to get his speed back right?

low chasm
#

Mhm

sterile sapphire
#

I don't care about Harrison Wells

#

I don't care about the 5 billion versions of him

#

Reverse Flash was the best villain

vapid nymph
low chasm
sterile sapphire
#

that first season

#

was amazing

#

at least Arrow directors knew that people really didn't care anymore

#

so they killed Oliver off in the Crisis what not

#

ok so now kill Barry please

low chasm
#

I didnt watch crisis lol, I stopped watching CW shows after a while

sterile sapphire
#

I didn't watch Crisis either

#

all I saw was the ending

#

they tried to make it like Infinity War and Endgame

#

and all dramatic and that shit

#

but literally nothing happened

#

please just discontinue the entire CW

#

scrap the entire network

#

it was fun for a while but no one cares anymore

sterile sapphire
#

is this accurate

last mantle
#

i mean

#

thats what i would do

#

haha

rancid yacht
#

yes

#

lolol

#

ive had nitro for like 2 years

last mantle
#

oh god, that hurts my head

rancid yacht
#

ahah

twin charm
#

👀

frozen crane
#

@rancid yacht please don't put lots of flashing colors in the server. We don't know which of our 160k+ members might have epilepsy.

rancid yacht
#

I have epilepsy lmfao

#

Should the video above also be removed? if they click on it without warning surely this correlates to the point you're making??

void grove
# rancid yacht I have epilepsy lmfao

You need a certain type of epilepsy to be affected by those flashing images, the term 'epilepsy' is too vague and broad, it is usually photosensitive epileptics that are affected by flashing images

kindred sorrel
#

Gotta love the banner+icon, even tho I'm not a fan of the festival

austere crane
#

since a lot of people liked it
here are some of rejected designs

#

banner5 was selected

low chasm
#

oh wow

#

Hm, the current one looks the best

austere crane
#

I loved the idea of 2 and 3

low chasm
#

Yeah, those are cool too

sterile sapphire
#

they all look really good

sterile sapphire
austere crane
#

nah man it was just photoshop stuff
nothing talent thingy

sterile sapphire
#

photoshop takes some skill too

#

you should give yourself some credit

austere crane
#

lemon liked it so yeah, it was a good job

#

it was not my whole design
people helped me choosing the colors and giving their opinion

broken vault
#

hi

#

everony

rough sapphire
sweet trail
#

hey guys, I'm curious about your opinion about Golang vs Rust for web backend..What do you say have better future for rest api developement?
I'm kinda interested in Rust, learned a lot in that but seems to be not so good for career as a rest api developer..

graceful basin
#

Go is definitely the easier language to write code in

#

but a lot of people hate go for very valid reasons

#

such as string handling

low chasm
#

Ive been learning rust recently, and its been great so far, but yeah, Go is syntactically easier

graceful basin
#

really, the issue with rust is that a lot of its complexity can just be done with GC instead, which ends up much easier

sweet trail
#

but ppl mostly use it to replace c++ tasks..

#

and web frameworks like Rocket.rs seem pretty promising

#

very nice syntax

#

readable etc

#

and safe

#

then why on the earth 'd someone use anything else? I know, developement speed.. but eh

low chasm
#

Support is one reason

#

Rust is still a fairly new language

#

So other langs with more resources and widespread support seem more appealing

sweet trail
#

it's like if a car had 500hp but really bad bodywork of "paper"

#

can be good but eh

graceful basin
#

the difference is software failures in a web API don't kill people

#

in fact, you will always have failures

#

so not having specifically application be correct isn't all that useful

#

since it won't safe you from the machine dying for some unrelated reason

sweet trail
#

oh

#

you mean that the machine itself goes off

graceful basin
#

ye

#

of your load balancer dies

sweet trail
#

yes

graceful basin
#

or your host has planned downtime

sweet trail
#

i got it

graceful basin
#

and well, more computers are much cheaper than more developers to make up for not being to able to quickly hack around features

sweet trail
#

but then why did Discord move from Go to Rust? they could have just put another server and vioala

graceful basin
#

they judged that the move would be cheaper than more servers

#

and also, go is really not the greatest language

sweet trail
#

What is so bad about it?

graceful basin
#

one great example is string handling

#

there is no string type which actually has unicode characters in it

#

python has str, rust has String, ...

#

Go strings are sequences of bytes

sweet trail
#

ohh

graceful basin
#

and the convention is to just assume they are utf8 encoded

sweet trail
#

i see

graceful basin
#

which is silly

#

also, a lot of people really hate the error handling, though I personally don't really mind

#

also, for the longest time, no generics

sweet trail
#

inspite of having this "bad habbit", go is still faster than node,java,c# as some benchmark shows

graceful basin
#

yeah, go is fast

#

but as we established, speed can be worked around

sweet trail
graceful basin
#

yeah, rust error handling is quite nice

#

still like cl conditions more, but Rust has good reasons for switching off them early on

gritty zinc
#

I heard Go had a very inefficient regex engine for years (still does?)

graceful basin
#

that is a fixable problem

#

but the overall pattern of being this powerful architecture atop with a rich language, but everything past that just being kinda meh

sweet trail
graceful basin
#

I personally have highest hopes for typescript

#

sharing code between front and backend is really valuable

sweet trail
graceful basin
#

and well, its a good language, easy to learn, typesafe, performant enough

sweet trail
#

comming from js world

#

react + ts + node + typeorm

#

or mongodb instead of typeorm, 🙂

#

mongoose with types are nice as well

#

but, thought about making a change..

#

for a "better" thing

graceful basin
#

that seems very similar to fastAPI

sweet trail
#

yeah

#

btw

#

everywhere i can hear, python on web is over and it should be over

#

😄

#

idk why

#

maybe bcs of the performance..

graceful basin
#

that is the main reason

#

but also, python isn't going anywhere anytime soon

#

rails is still very much alive

sweet trail
#

yeah..

#

i like django as well

graceful basin
#

hell, pure PHP is still in full use

sweet trail
#

and python in overall

graceful basin
#

not lavarel, just flat our php with php4 templating

sweet trail
#

maybe more than i do like js 😄

#

yea

graceful basin
#

it is pretty nice, yeah

#

personally, I like haskell for web backends, but it has its many many flaws

sweet trail
#

but then it could be Rust too.. couldn't it?

#

Rust or Haskell. complex-complex

#

😄

#

(never touched haskell before)

graceful basin
#

Haskell is much nicer than rust

sweet trail
#

ohm

#

ah

#

okay

#

😄

graceful basin
#

don't have to write every function 3 times so that it works T, &T and &mut T

sweet trail
#

Yeah..

graceful basin
#

can't forget Rc vs Arc vs ...

#

safety is nice

#

but I like quickly creating functions

sweet trail
#

I thought about having React+ts, django/flask/fastapi whatever, rust as a knowledge.

#

these i like the most

graceful basin
#

honestly, the main annoyance with rust for me wasn't even the lacking polymorphism, I just put Copy on my structs, but the incredibly long project setup time since cargo has to compile everything from scratch everytime you start a project

sweet trail
#

yeaaah

#

that's really freaking long

#

😄

graceful basin
#

you can't even use your PC while this is happening since your CPU goes to 100

sweet trail
#

that's a well known disadv. ye

graceful basin
#

Julia and Odin also ran into this very quickly

#

Odin just stopped using LLVM

#

Julia is doing its best to make it not terrible

sweet trail
#

i don't know them

graceful basin
#

Julia replaces python for data science

#

Odin is a low level lang

#

Haskell has a similar issue, but you can reuse already built things

#

still requires compilation at least once

#

so not as good as python

#

where you compile 0 times per project setup thanks to wheel

gritty zinc
#

is Julia nicer with plotting/dataframes/datetimes/stuff like that?

graceful basin
#

yes

sweet trail
#

but why do they doN't care about python's performance enough?

#

i think they could improve it

#

or?

graceful basin
#

python is as fast as it can be

gritty zinc
#

hmm, should probably check it out. I didn't enjoy my today's foray into dataframes of dates 😅

graceful basin
#

there is pypy for longer running tasks

#

but keep in mind that CPython is also used for scripting

#

where it decimates pypy due to faster startup times

#

high flexibility and metaprogramability come at a performance cost

sweet trail
#

Yes.

#

that's why i like python

#

iam not so good at math, don't even have cs degree.. just like coding and creating things this way.

#

but i kinda know how things work already

#

more or lass

#

less*

graceful basin
#

but also, it means you can't get stuck in a case where you realize you need to move data into a place where it wasn't meant to be and have to refractor the entire application

sweet trail
#

sometimes Rust seems an overkill for my brain

#

😄

graceful basin
#

Rust has it's panics for that

graceful basin
#
let mut ohNoINeedTheDatabase20PureCallsDeep: Option<DBConnection> = Nothing();
graceful basin
#

you can share data globally in rust if you lie to the compiler and panic enough

#

which is great for quickly hacking a feature together

sweet trail
#

wow, no clue how to do that tbh 😄 am not a rust expert by any means.. just learning that

#

i'm now at traits 😄

graceful basin
#

traits are the cool part

#

almost 1:1 copy from haskell

sweet trail
#

Yeah

#

really enjoy them

#

so what would you say, will rust be in 2-3yrs a relevant choice in api devment?

graceful basin
#

yeah, probably

#

maybe not for quick and dirty things, but if you need to speed something up for whatever reason, I do think rust will be what people will reach for

sweet trail
#

nice

#

then my motivation keeps alive

#

😄

gritty zinc
#

In Julia % is the remainder operator, whereas in Python it is the modulus.
lulwut

#

what's that supposed to mean 😅

honest pawn
#

Ain't that the same thing?

#

🤔

graceful basin
#

the difference is for negative numbers

gritty zinc
#
julia> -5%2
-1
#

oh, that's annoying. Different identity

#

wait, how the hell am I supposed to type this lol

graceful basin
#

\div tab

gritty zinc
#

do I even have the division symbol

graceful basin
#

or just div

gritty zinc
graceful basin
#

what terminal emulator?

#

there is the julia mono font for well, programming julia

gritty zinc
#

that'll probably go away once I start using an IDE and not the REPL Julia comes with

#

Julia allows arbitary Unicode variable names? Oh dear

graceful basin
#

not arbitrary

#

but pretty close

rough sapphire
#

hello everybody

#

I want to understand the concept of SSIDs

nova phoenix
vapid nymph
#

this is not my real nickname

#

@nova phoenix have fun

nova phoenix
#

oh ok

#

gotcha

tiny drum
#

hi

nova phoenix
#

hi

tiny drum
last mantle
#

damn sebastiaan reacted to this

vapid nymph
#

he was the first to add the roundtable_last_week

last mantle
#

hmm why tho

edgy crest
#

hm if its that important then i will remove kek

#

🥴

last mantle
edgy crest
#

i k

acoustic moss
#

nooooooooooo

edgy crest
#

lol

#

hm ill react to it again

acoustic moss
#

it should be pinned tbh

edgy crest
#

after keke is gone

vapid nymph
#

🤞

short locust
hollow leaf
#

👀

twin charm
#

.topic

median domeBOT
#
**What is your favourite place that you have visited?**

Suggest more topics here!

twin charm
#

Nowhere

edgy crest
#

that looks worse yk

topaz aurora
#

Ruby (?)

edgy crest
#

thats ruby? thinkies

graceful basin
#

that's julia

#

gotta say, prefer elm for this

#

why does it need a special for loop macro

graceful basin
#
[ h1
    [ "Bill Gates' top "
        ++ (String.fromInt <| length books)
        ++ "recommended books"
        |> text
    ]
, ul
    []
  <|
    map (\book -> li [ text book.title ++ " by " ++ book.author ] []) books
]
#

you can escape html

graceful basin
#

to be fair, elm is much older than julia

wraith hound
#

@gaunt bluff Trying to learn NodeJS without JS knowledge is a very bad idea.

#

Node is just a backend version of JS.

gaunt bluff
#

@wraith hound i already have a good grasp of python (intermediate) so i can imagine JS will not be too bad

#

but do you recommend any course

#

have like 2-3 weeks until i start my internship

wraith hound
#

I know, but don't learn Node without JS.

gaunt bluff
#

and they waned me to learn some nodeJS but now i gotta learn some JS basics

wraith hound
#

JS is easy to learn, but don't jump into a Lamborghini (Node) without knowing how to drive.

gaunt bluff
#

haha i love that analogy. i see what you're saying here

#

are you familiar with JS?

#

or have done JS in the past?

#

want to see how much JS would i need to know to start dabbling with nodeJS

#

(or rather how much i can get away with lol)

wraith hound
#

Yeah, I use JS.

#

It's a rather simple language.

#

It should only take you a week or two to learn the basics.

#

And Node isn't that hard either.

gaunt bluff
#

sounds good!

#

any recommendations on a course thats video/practical?

wraith hound
gaunt bluff
#

Have codeacademy saved

#

how about the odin project

mellow spire
last mantle
#

what do i do

#

yay -S piston-cli?

#

git or bin?

#

answer please 😔

sterile sapphire
#

idk why I find these video essays so interesting

mellow spire
#

this

last mantle
#

oki

mellow spire
#

Worked?

#

@last mantle 🏓

last mantle
#

did not try yet

mellow spire
last mantle
#

k

last mantle
#

the python packages

gritty zinc
#

@zenith quail By the way, I had different performance between my jupyter and my optimization venv - the numba function was 4-5 times slower in Jupyter. It turns out this is because of different numba versions - I updated the Jupyter's numba to 0.53.0 (latest for my Python, the same as in the venv) and they match now. So numba version matters a lot.

500 prefixes of length 10 and a million strings of length 50.02 take around 9 seconds for the numba function to crunch through:

A = ["".join(random.choices(string.ascii_letters, k=10)) for i in range(500)]
# noinspection PyTypeChecker
B = [pref + "".join(random.choices(string.ascii_letters, k=50)) for pref in A] * 5
B.extend("".join(random.choices(string.ascii_letters, k=50)) for i in range(1000000))
print("Lengths of A and B:", len(A), len(B))
print(f"Average prefix length:{sum(len(p) for p in A) / len(A)}"
      f", average string length: {sum(len(s) for s in B) / len(B)}")
random.shuffle(B)
res, t = time_call(filter_prefixes_numba, A, B)
print(t)
Lengths of A and B: 500 1002500
Average prefix length:10.0, average string length: 50.02493765586035
<bunch of numba warnings about reflected lists omitted>
9.079387363999999
zenith quail
zealous delta
#

does anyone know some electricity theory in physics??

rough sapphire
zealous delta
#

hey thanks^^ so I'm learning about point charges and electric force, and I was wondering why a material that is easily polarised has a high permittivity?? Shouldn't it be the opposite? @rough sapphire

gritty zinc
#

the more permittivity, the more displacement from the same electric field, and the more energy stored per unit of volume if you make a capacitor out of it

zealous delta
#

ohhhhh I see now

#

thank you

gritty zinc
#

Cannot determine Numba type of <class 'marisa_trie.Trie'>
😔

#

cython it is I guess

vapid nymph
#

.topic

median domeBOT
#
**What would you do if you know you could succeed at anything you chose to do?**

Suggest more topics here!

gritty zinc
#

@zenith quail Okay, purely for my own curiosity, I did find a trie library: https://github.com/pytries/marisa-trie. This library is horrible in having zero docs, only docstrings on methods, and it's also not compatible with numba. And yet when I used it...

def filter_prefixes_trie(_prefixes: List[str], strs: List[str]) -> List[str]:
    prefixes = Trie(_prefixes)
    results = []
    for s in strs:
        for _ in prefixes.iter_prefixes(s):
            results.append(s)  # only need one
            break
    return results

I got a 10x speedup compared to the numba version. Instead of 9 seconds on 1 million strings, this takes 0.89 seconds.
...yeeeah. using a proper algorithm sure is amazing.

#

hilariously, the library lists the prefixes function as being implemented inefficiently

#

which, like

#

it certainly still is 10x faster than startswith even for as little as 500 prefixes, lol

zenith quail
graceful basin
#

I wonder if regex internally implemets a trie

acoustic moss
#

You know
I'd never once wondered about how regex works internally
Now that I think of it
How on earth does regex work?

#

Like

#

Across different languages

#

Pretty sure itd be more complicated than a for loop over the string

gritty zinc
#

something something finite automata?

graceful basin
#

the most naive way is essentially a giant decision tree

#

enumerate what characters may be next, and see if the character that is next, keep matching

gritty zinc
#
%timeit any(B[1].startswith(a) for a in A)
93.6 µs ± 3.68 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit trie.prefixes(B[1])
829 ns ± 30.7 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

here's how much faster the trie is, lol

#

a single startswith call is 200ns, the entire trie check is 800 ns

#

this is function call speeds

acoustic moss
#

Didnt notice the ns vs us first lol

graceful basin
#

try

re.match('^(?:'+'|'.join(A)+')', B[1])
gritty zinc
#

for a library with no docs, these are some nice bindings

#

huh, weird

#

weird

#

why does compiling the regexp make it slower

#
%timeit re.match('^(?:'+'|'.join(A)+')', B[1])
26.9 µs ± 3.45 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
reg = re.compile('^(?:'+'|'.join(A)+')')
%timeit re.match(reg,B[1])
51.1 µs ± 6.95 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
#

this is 4 times faster than startswith, but pretty slow still

graceful basin
#

guess no tries for regex

gritty zinc
#

I suspect it doesn't perform literal optimizations like some regexp engines can

#

hmm, maybe I should also try regex

graceful basin
#

do you need a specific prefix, or just whether a prefix exists

gritty zinc
#

just whether it exists

#
import regex
%timeit regex.match('^(?:'+'|'.join(A)+')', B[1])
46.5 µs ± 2.04 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
reg = regex.compile('^(?:'+'|'.join(A)+')')
%timeit regex.match(reg,B[1])
46 µs ± 5.25 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)

regex is slower, but doesn't have the weird performance loss from compilation

graceful basin
#

how about

def is_prefix(prefixes, string):
    p = set(prefixes)
    s = ''
    for c in string:
        if s in p: return True
        s += c
    return False
``` (numba will make this slower, since it doesn't optimize +=)
gritty zinc
#

well, it certainly won't be faster than the trie, considering 800ns is literally 4-5 function calls or so

#

lemme see

#

12.6 µs ± 3.71 µs per loop (mean ± std. dev. of 7 runs, 100000 loops each)

#

that's quite nice

graceful basin
#

that is really good

gritty zinc
#

(and that's after I took the creation of the set outside the function, it's unrealistic to do it for each element)

low chasm
#

How can I look forward in an iterator in rust without actually moving forward in the iteration

#

nvm got it

gritty zinc
low chasm
#

Would .nth not work?

gritty zinc
#

Returns the nth element of the iterator.

Like most indexing operations, the count starts from zero, so nth(0) returns the first value, nth(1) the second, and so on.

Note that all preceding elements, as well as the returned element, will be consumed from the iterator. That means that the preceding elements will be discarded, and also that calling nth(0) multiple times on the same iterator will return different elements.

nth() will return None if n is greater than or equal to the length of the iterator.

#

that's just for skipping a few, no.

low chasm
#

ah, ok

#

hm

#

dont think it'll work

#

damn

#

nvm it'll work

vapid nymph
low chasm
#

Also, say I have a vec with the below values 1, 2, 3, 4, 5, 6 And I want to insert 7 to the vec, how can I found out at what index it will be at? In this case, it can't be the last index, because there could be 8, 9, 10 pushed on the vec, with no 7.

gritty zinc
#

uhh, what

#

push adds to the end, doesn't it?

low chasm
#

it does

#

Alright, I want to insert it into the vec

#

Actually, I worded this wrong

#

Alright, say my vec has all the numbers up till 6, and I want to add 7 to my vec, how can I know what index the seven will be at, before pushing it onto the vec

#

I want to keep track of its index before its pushed

gritty zinc
#

...the index the element will be put at when you push it is going to be vec.length(), always, because it's the current end

low chasm
#

Yeah, but say I have 8 on the vec, and I want to insert 7 before it

#

BUT, before I insert it, I want to know what index it will be at

#

And after I have the index, I want to insert it

gritty zinc
#

...at the index you pass to insert?

low chasm
#

yes

gritty zinc
#

are you perhaps trying to find the index to insert an element at to maintain sorted order?

low chasm
#

Uh, yeah

gritty zinc
#

ah, that can be found quickly via binary search, and I bet there's a method for it.

low chasm
#

I can give you context if you want

gritty zinc
#

f the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

rough sapphire
#

How to create something like this ```
.................║▒
.................║▒▒
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
.................║░▒║
...............▓▓▓▓▓▓
................ ]█▓[.....
. . . . . . ....]█▓[......

low chasm
#

I'll check that out, thanks :D

#

Hm

#

But thats after the value is inserted

#

I want to know where it'll be inserted before its inserted

graceful basin
#

It returns where you should insert to maintain sorted order

low chasm
#

Its for my stack in my programming language, my language is divided into four parts, the lexer, parser, compiler, and VM. In my compiler, I generate opcodes from my AST. My opcodes look like this ```
(LOAD_VALUE, 0)

low chasm
#

OH yeah I didn't read enough of it lmfao

#

hold on

#

my stack doesn't have a particular order

#

I just push and pop things as I go

#

wait i think .length might work

#

shit

strange musk
#

Anyone know how somone searches for the latest papers with relevance + latest ones?

#

I usually don't realize when a previous method is antiquated

gritty zinc
low chasm
#

Lmao, I meant where it would go

#

Which I now realize is the end of the vec

gritty zinc
#

...to vec[vec.length()]?

low chasm
#

I overthought it lmfao

#

I think i got it

#
                    let index = self
                        .stack
                        .inner_stack
                        .iter()
                        .position(|x| x == self.constant_table.last().unwrap())
                        .unwrap();
gritty zinc
#

this makes me anxious about whether self.constant_table.last().unwrap() will be calculated once or for every iter

#

I hope it's once

#

but I don't know why would it be

tardy rain
#

Rust, more like unwrap bonanza

gritty zinc
#

how dare you use Rust, don't you care about the environment

#

discarding all these wraps like that...

low chasm
#

lmfao

#

I'll optimize it later

#

I want it to work first

vapid nymph
wraith hound
#

Yes, Python 2 is far past EoL.

low chasm
#

lol

vapid nymph
#

APPARENTLY ITS NOT

vapid nymph
wraith hound
#

NICE

young shoal
#

surely

vapid nymph
#

help me.

vapid nymph
#

in short

#

something is completely borked

mellow spire
tranquil orchid
#

@dusky mulch but anyway yeah, given their price if they can run linux it sounds like a solid option to me

dusky mulch
dusky mulch
tranquil orchid
#

Oh as in a virtual machine?

edgy crest
#

you can unlock full linux from chromeOS iirc

tranquil orchid
#

Hopefully, that would be far more ideal

dusky mulch
#

instead of a normal lappy

solid elbow
#

My day to day personal laptop is a Chromebook. I'm a fan. My biggest complaint with them is the very limited storage. Make sure you buy one with an SD card slot or something. Beyond that, great little machines

scarlet wind
#

What is python 2?

inland wolf
#

the second version of python

last mantle
#

damn

mellow spire
last mantle
#

@mellow spire

narrow pecan
#

Sadly, it’s still not completely dead

edgy crest
#

@mellow spire you can copy my PKGBUILD

#

just include the pip package and AUR should handle it

mellow spire
mellow spire
mellow spire
#

it is a problem with the rich package afaik

rough sapphire
#

Ayo

edgy crest
#

@mellow spire the package is broken

#

first of all, piston-cli-bin should install the binary

#

but it starts building it

#

even after building it, it does not add the package to the bin folder

#

so you cant use the binary

#

basically does not really install it

#

and so if you want to uninstall, you cant

#

and you have got unecessary files in the yay cache folder

#

gurkeeep's problem is a mirror one, nothing related to the package

edgy crest
#

you can get the sha256 from the pypi package info

delicate sky
mellow spire
#

Or maybe comment the fix on the or

#

PR

scarlet wind
earnest mortar
#

jjjjjjjjjjjjjjjjjjjjjjjj

last mantle
#

yes, jjjjjj

mild cove
#

simple question that isnt worthy of help channel - is poetry worth it to use instead of setup.py ?

edgy crest
finite sierra
#

poetry makes life super easy

#

publishing your package is literally just one command

#

poetry publish --build

last mantle
#

just python setup.py or some other unique features?

solid pollen
#

It is ran by pip on install

#

You usually just use twine to package it and you are good to go

#

Hmmmm maybe it is also run during packaging

edgy crest
#

yeah if you are using twine, you gotta build first, which runs the setup.py file and stores the dist and build folder + egg file in your current directory

#

then you can upload the dist folder with twine on pypi

calm dawn
#

Always has been...

twin charm
#

@rugged echo mind sending that iconic photo which has a beautiful frame?

rugged echo
twin charm
edgy crest
#

bruh

rugged echo
#

lol

calm dawn
#

GOLD

#

somebody pin that

#

pls

inland wolf
#

no

rough sapphire
#

is python 2 ded yet

graceful basin
#

more or less yes

rough sapphire
#

why 🖌️

graceful basin
#

because it is worse than python 3

rough sapphire
#

Does anyone know how to get the formatting right, I want to paste this in Adobe Reader

#

but it only show it like this

#

Is it possible?

acoustic moss
#

latex?

rough sapphire
#

Adobe pdf reader Pro version

rough sapphire
acoustic moss
#

in general you use latex for making pdfs with mathsy formatting

#

it's a markup(down?) language kinda thing

rough sapphire
#

They way I'm submitting assignments so far is to edit the pdf we got with a text field

harsh tundra
acoustic moss
#

Hmm

harsh tundra
acoustic moss
#

Huh

sterile sapphire
#

what is going on

rough sapphire
acoustic moss
#

Self bot?

sterile sapphire
rough sapphire
#

Thanks I will do it like that

acoustic moss
#

`help

#

#help

#

🥴

twin charm
#

very very sus

#

thats the only message that they sent. the same thing 10 times

sterile sapphire
#

yeah I got no clue what's going on

rough sapphire
#

The free (as speech) PDF tool, Okular, supports this functionality by putting latex formula directly between $$...$$.

#

There are a few solutions on stackoverflow like:

#

but I just want to get it done quick without downloading that

sterile sapphire
#

it probably is a self bot

acoustic moss
#

Anyway

twin charm
#

remember the person who used to send twitter links

rough sapphire
#

used to?

#

so not anymore?

narrow pecan
#

The issue with # as a prefix is that it's really difficult use, considering that Discord will suggest channel names when you start typing the commands

sterile sapphire
#

yeah someone told him to stop

acoustic moss
#

Same with @ i guess

narrow pecan
#

Yeah

twin charm
acoustic moss
#

Bleh

sterile sapphire
#

I just thought it was them trying to get clout

acoustic moss
#

Ngl i am not really bothered by selfbots

#

Like sure

#

They break tos and all

#

Idrc

twin charm
#

yeah

narrow pecan
#

If you were to guess, why do you think that Discord disallows them?

sterile sapphire
#

spam?

acoustic moss
#

Spam

#

Mass dms

#

Etc

twin charm
sterile sapphire
acoustic moss
#

Lol

sterile sapphire
#

and they keep mass DMing everyone

#

everyone on the server

narrow pecan
#

Doesn't spam, mass DMs and all of that bother you?

acoustic moss
#

Kfc bot in pydis when

twin charm
#

lemme join that server

quick bay
#

also they read the whole chat

sterile sapphire
#

it's a well known scam

#

but Nick can't figure out how to block them based on their messages

hot dove
sterile sapphire
#

apparently the bots don't work??

hot dove
#

and it fucking sent in the wrong server

#

😭

sterile sapphire
twin charm
acoustic moss
acoustic moss
twin charm
#

not all bots are self bots kiddo.

acoustic moss
#

What

hot dove
#

im not self botting omfg

#

OHHHH

acoustic moss
#

I mean
If a bot sent a message through your acc

hot dove
#

I put in my token WHY

rough sapphire
hot dove
#

for the login this

#

thing*

twin charm
acoustic moss
#

Self bots break tos by definition

#

Lol

quick bay
#

self botting still is self botting?

twin charm
#

I'm not talking about self bots

quick bay
#

no matter what it does

acoustic moss
#

Ok

hot dove
#

I'm trying to make a chatbot that uses an AI to respond to other peoples' messages

sterile sapphire
#

guys

twin charm
#

yes?

sterile sapphire
#

leave him alone

rough sapphire
#

def bot(self)?

sterile sapphire
#

mods are handling it

hot dove
edgy crest
hot dove
#

besides i wouldnt selfbot on an account i literally spend money on

#

thats just plain stupid

acoustic moss
#

Lol

hot dove
acoustic moss
#

Idek my token lol

hot dove
#

I have mine in a notepad

acoustic moss
#

Ok

edgy crest
#

Ok

quick bay
#

anyone know where i should go to learn how to set up a git and stuff like that>

twin charm
#

Ok

rough sapphire
#

🆗

quick bay
#

windows

edgy crest
#

idk

hot dove
#

search on yt

twin charm
edgy crest
#

ask hahastinky

hot dove
#

"how to setup git windows 10"

acoustic moss
quick bay
#

okey dokey thanks

twin charm
hot dove
#

I never set it up

#

I don't use github

edgy crest
#

if you dont have any projects to contribute to theres this really nice open source group..

acoustic moss
#

there's like 5 or 6 commands you'll be using regularly

rich moon
#

there is only really a few commands that u will actually commonly use

honest star
rough sapphire
#

I tried to set git up but failed to connect it to github somehow. SSH connection / toke or something

hot dove
#

I just use it for looking at other peoples' code and hopefully finding an error and then fixing it for them

twin charm
#

o no its 10 o clock

hot dove
#

It's 12:30pm for me

#

wya

edgy crest
twin charm
acoustic moss
edgy crest
acoustic moss
#

gurkuly

twin charm
#

Oii

narrow pecan
#

gurklang is great

twin charm
#

the lord has awoken

rough sapphire
#

g u r k l a n g

twin charm
acoustic moss
#

Awkakwen

twin charm
#

ok thanks

acoustic moss
#

Np

twin charm
#

.topic

median domeBOT
#
**What is your favorite media genre?**

Suggest more topics here!

twin charm
#

cliche topic

acoustic moss
#

Pydis media lemon_fingerguns_shades

twin charm
#

well all of them are cliched

twin charm
#

where are the sebastiaan emojiiiis?

sterile sapphire
#

what avatar would stand for sebastian

#

lemon is easy bc it's lemon

narrow pecan
sterile sapphire
#

sebastian doesn't evoke any imagery in my head other than his face

edgy crest
sterile sapphire
#

am I making any sense

twin charm
sterile sapphire
twin charm
#

oh I get it

#

'what the face is resembling'

#

.topic

median domeBOT
#
**What is your favourite color?**

Suggest more topics here!

twin charm
#

🔴 and 🟠

last mantle
#

hmm

twin charm
#

.topic

median domeBOT
#
**What is your favourite food?**

Suggest more topics here!

twin charm
#

hm.

#

Rice pancakes with Sambar curry.
Puri with Bhaji (I cant choose between the two :( )

sterile sapphire
#

do you mean Idli

#

by rice pancakes

edgy crest
#

dosa i think

twin charm
#

rice pancakes are dosas. idlis are steam cooked

sterile sapphire
#

oh

edgy crest
#

idlis are steamed

sterile sapphire
#

whoops

#

I like this one dosa spot in NY

#

I've been going there ever since I was little

twin charm
#

you live in NY?

sterile sapphire
#

yeah

twin charm
#

damn thats cool.

#

urban expansion and development at its peak 👀

edgy crest
#

oh so you are american indian?

rough sapphire
#

whatever chutney my mom makes for the rice pancakes, i always ask for podi :D (s a coarse powder mixture of ground dry spices that typically contains dried chilis, urad (bean), chickpea, and sesame seeds.)

last mantle
#

you are indian?

rough sapphire
#

mhm

acoustic moss
#

Arent we all

last mantle
#

ye its like, pydis is raided by indians

sterile sapphire
#

I am only "American" bc I was born in America

edgy crest
#

oh ok

sterile sapphire
#

I am apparently purely Indian

#

idk how true that is

acoustic moss
#

Do you like to watch cricket

edgy crest
#

no

#

does that make me not indian?

#

;(

acoustic moss
#

Not an indian then /s

sterile sapphire
#

yeah I watch cricket

#

don't really know what's going on

acoustic moss
#

Lol

edgy crest
#

i did like to watch cricket when i played it but i dont like it anymore

sterile sapphire
#

I like football more

#

not american football

#

european football

acoustic moss
#

Yes
Bengali then /s

#

American football more like handegg

edgy crest
#

also i went to the calcutta stadium 3 years ago to watch IPL PepeHappy

sterile sapphire
#

I feel bad for the really talented Indian footballers

#

like India does not care about footbal

#

at all

acoustic moss
#

No moni

#

Sad

sterile sapphire
#

it's all education

#

and cricket

edgy crest
#

i dont remember the stadium name

#

something like eiden

#

or what

acoustic moss
#

They tried so hard with Isl

#

Eden gardens yeah

sterile sapphire
#

if you're Indian your football career ended before it even started

acoustic moss
#

Hm

sterile sapphire
#

unless you're in another country

#

preferably europe or south america

#

North America has no talent

acoustic moss
#

Lol

sterile sapphire
#

it's a shame

#

you have to pay

#

to play for teams

#

also MLS has no demotion of teams

#

there are no inferior leagues

#

so there's no quality control

#

it's pathetic

acoustic moss
#

Cant have quality control if theres no quality

sterile sapphire
#

all the good American players

#

they all play overseas

#

they don't play in the MLS

#

Hmmmmm I wonder why

acoustic moss
#

Ibrahimovic

#

Why
He
Move
To
Mls

sterile sapphire
#

Ibrahimovic is swedish my guy

#

and he got bored

acoustic moss
#

Lol

sterile sapphire
#

and he dominated the league too

#

Schweinsteiger dominated the league too

#

with Chicago Fire

#

David Villa

#

these european superstars destroy MLS teams

#

bc the quality of football in Europe is 10x better than MLS

acoustic moss
#

yeah

sterile sapphire
#

with Messi and Ronaldo slowly fading

#

Mbappe and Haaland are taking over

#

god knows what Neymar is doing

#

Neymar wasted his own potential so badly that Mbappe is the world's superstar not him

last mantle
#

can i run discord bots in docker containers??
and is there any advantage in doing so?

vapid nymph
vapid nymph
#

100% possible

#

nah im kidding @royal lake, @median dome, and @polar knoll all run in their own docker container

graceful basin
#

you get the advantage of easy deployment in anything you want

last mantle
#

i see

last rivet
#

First time I went to stackoverflow and I already felt like I was gonna be heading there for hours.

harsh tundra
vapid nymph
royal lakeBOT
vapid nymph
#

!pypi coloredlogs

royal lakeBOT
vapid nymph
#

hmmm

harsh tundra
#

normal levels are enough for me. I just add -v flag to drop logs to stodout and --debug flag to set logging level to debug (by default I log info, but I also made a flag --info in my general argparser)

last rivet
#

Your average sunrise in about 5 billion years be like:

acoustic moss
#

yes

last mantle
#

There will be no earth tho haha

last rivet
#

I never talked about the earth being there though.

last mantle
#

There will be no sunrise then

last rivet
#

Bad joke time:
If you are what you eat, then don't eat vegetables, or else you will be in a drum noises
Vegetable state.

tardy rain
#

Bro stop

low chasm
#

lmfao

last rivet
#

.topic

median domeBOT
#
**If you could have any superpower, what would it be?**

Suggest more topics here!

last rivet
#

super precision

#

I keep missing stuff.

calm dawn
#

who decided to rename all the help channels to food?

#

I miss the elements 😟

shrewd prawn
calm dawn
#

Personally I don't see how that helps but ok

last rivet
#

"A gps"

#

beautiful subtitles

rough sapphire
#

It helps

#

I'd say

#

My first thought seeing the science help channels was "huh, they have dedicated help channels for Python packages"

acoustic moss
#

Yeah they had to remove help-selenium lol

rough sapphire
#

Not only that 😄 Elements also sound like they refer to actual packages, not the element themselves

glossy elk
#

But it actully nice to have help channels

rough sapphire
#

Yeah

shrewd prawn
#

i didnt even know abt selenium when i saw the help channel, so when someone mentioned selenium, i thought they were talking abt the help channel lol

acoustic moss
#

Lol

glossy elk
#

LOL

acoustic moss
#

Bs4 and selenium were two of the first python libs id discovered for ...reasons

glossy elk
#

It's for web scraping r?

acoustic moss
#

Yes

glossy elk
#

ok

#

Did you try to scraping linkedin?

rough sapphire
#

i think its against their tos

calm dawn
#

In case you didn't know

vapid nymph
calm dawn
#

probably

#

I didn't write it

harsh tundra
#

does it need to be double-barrelled? in games shotfun usually has large area it covers (on small distance), so I imagine it's like shrapnels?

#

"A shotgun shell, shotshell or simply shell is a type of rimmed, cylindrical (straight-walled) cartridges used specifically by shotguns, and is typically loaded with numerous small, pellet-like spherical sub-projectiles called shot"
^Wikipedia

calm dawn
#

Why are there so many other nerds here :D

low chasm
delicate sky
#

lol

low chasm
#

uh

calm dawn
#

"wait it's all nerds?"

#

"always has been"

low chasm
#

lol

delicate sky
#

@calm dawn
this is what would a among us crewmate say: "wait it's all nerds?"
this is what would a among us impostor say: "always has been"

calm dawn
#

good to know

hollow leaf
#

Hm 🙂

vapid nymph
#

joe you got this wrong

last rivet
#
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
``` why is brainf🧠ck a hightlighted language for syntax highlighting...
#

They really like esolang.

rough sapphire
#

what's a lexer?

#

please explain like i'm 5

edgy crest
#

tbf i dont really know but i give that name to my function which does the tokenization before parsing

#

i think it actually does mean tokenization

topaz aurora
#

lex?

low chasm
#

A lexer basically takes a string input and tokenizes it

#

Say I have print("hi") as source code, the lexer will take this string and produce the following ```
PRINT
LBRACKET
STRING
RBRACKET

rough sapphire
#

nice

low chasm
#

These lexed tokens are usually (or at least in my case) are passed to the parser in order to be parsed into an ast

rough sapphire
#

ok

#

i'm making mine in python

low chasm
#

Cool

#

My language is in rust

rough sapphire
#

and is gonna be statically typed and interpreted

low chasm
#

I VERY highly suggest reading craftinginterpreters

rough sapphire
#

it's in java :pain:

low chasm
#

The second part is in C

rough sapphire
#

is in?

#

ok

low chasm
#

You can take a look at my source code if you want

rough sapphire
#

i found a lib for it

low chasm
#

It's in rust, but the contets will still apply

rough sapphire
#

!pypi sly

royal lakeBOT
rough sapphire
#

lexer

#

:D

#

and parser

low chasm
rough sapphire
#

lark?

#

!pypi lark

royal lakeBOT
low chasm
#

I don't suggest using sly

#

It's sort of outdated

#

Lark is much more straightforward

rough sapphire
#

it's both a parser & lexer

low chasm
#

If you want to, maybe try making the parser and lexer yourself

rough sapphire
#

i'll test out stuff

low chasm
#

I highly recommend lark

#

I used it a while back

rough sapphire
#

@low chasm how did you make the site?

rough sapphire
#

for ur language

low chasm
#

I used mkdocs

#

I can explain tmrw

rough sapphire
#

ok

#

gn

#

it's 12

#

for you

#

NOW GO SLEEP

low chasm
#

Yeah lol

#

Gn :D

edgy crest
#

@low chasm bro

#

2 clones is not ok monkaS

#

why did you clone in the for loop

#

scrolling through you have more clones

#

that could affect performance a lot

acoustic moss
#

Begun the clone wars have

edgy crest
#

you are cloning a lot of things not just the lexer iterator

#

i dont understand why thinkies

#

here you can omit the Expr::String arm all together right

#

ree clone is everywhere pepecry

#

you will have to fix those later

topaz aurora
#

Lark is really nice

vapid nymph
#

wait why

#

there's two near identical sticker packs

last mantle