#ot1-perplexing-regexing

1 messages Β· Page 537 of 1

acoustic moss
#

yea

inland wolf
#

bruh imagine calling it size()

#

c# calls it Count

#

its length or nothing

gritty zinc
#

in Java, even though your IDE would of course generate them, it'd look like:

class MyClass{
    int x = 5;
    int getX(int val){
        return x;
    }
    void setX(int val){
        x = val;
    }
}

In Kotlin it's just roughly:

class MyClass(
    x: Int = 5
){
    var x = x
}

or even:

data class MyClass(
    var x: Int = 5
)
#

and it works exactly the same - it's not just a field, it has autogenerated setters and getters, and you can make them non-trivial if you want

eager cliff
#

development environments would generate code for something like this? thonkfast

gritty zinc
#

how would Java programmers live otherwise

acoustic moss
#

or shift insert, i think

eager cliff
#

that is actually kind of cool.

gritty zinc
#

ooooh yeah, crashing again!

graceful basin
#

java can do that too

acoustic moss
#

you can auto generate constructors in intelliJ πŸ₯΄

graceful basin
#
record Point(int x, int y) {}
eager cliff
#

i can hear the segfaults now.

gritty zinc
#

if you're on Java8, you're out of luck

graceful basin
#

why would be on java 8?

gritty zinc
#

though I suppose it might be possible to use it, I'm not sure how backwards-compatible Java is with regards to language version/JVM version

graceful basin
#

mostly is

#

fabric works with new java

#

forge afaik too, though worse due to how it hacks around classloading

gritty zinc
#

I think before the newer versions at least, Forge needed Java 8 strictly

#

not sure now, but doubt it went all the way to 16

graceful basin
#

if it works with 9, it is very likely it works with all new java versions

#

actually, only up to 14

#

since it relies on nashorn

#

which is removed in 15

eager cliff
#

we are on version fifteen?

#

does Minecraft not use Java eight?

graceful basin
#

16 is released

eager cliff
graceful basin
#

MC runs on 15 fine

#

didn't test 16 yet

eager cliff
#

oh okay then. i thought Minecraft was running on eight for the past like, decade.

graceful basin
#

it was

#

but isn't anymore

vapid nymph
eager cliff
#

the tides have turned.

vapid nymph
#

large emotey

gritty zinc
#

Note that Minecraft is a lot more okay with newer Java versions than Forge

eager cliff
#

you are using Fabric, right?

gritty zinc
#

currently, yeah

eager cliff
#

i never understood the reason behind them just making a new system.

#

was Forge code that messy?

#

or..?

gritty zinc
#

mostly I'm just learning modding, though - since I don't play fabric, I doubt I would mod for it

eager cliff
#

gives you something to do.

gritty zinc
eager cliff
gritty zinc
#

(like, not Forge-using mod devs, but developers of Forge)

eager cliff
#

they just want to see everyone suffer.

graceful basin
#

Forge has this mentality of "mods should have limited scope"

eager cliff
#

🀨

graceful basin
#

which a lot of people consider sacrilige

eager cliff
#

limited scope?

#

like, in size?

graceful basin
#

no, in terms of how much they change the game

eager cliff
#

i feel like that defeats the purpose of modding, but i guess that is why people consider it sacrilige.

#

Merry Christmas everyone!
Parody of Jona Lewie - Stop the Cavalry
Animation by Ciaran: http://www.youtube.com/user/Ceeraanoo
Music by Jason Bentch: https://twitter.com/BentchIMightBe

β™₯ T-shirts and jumpers: http://yogscast.spreadshirt.co.uk/
β™₯ Subscribe: http://www.youtube.com/subscription_center?add_user=bluexephos
β™₯ Get partnered on YouTube:...

β–Ά Play video
sand inlet
#

@clever delta after reading it more closely: there is one potential thing

#

if you use the ISS pass times API, that does mean that you can actually send them data

#

so if it's over HTTP, someone with access to the network could potentially read that

clever delta
#

Ok, I assume that shouldn't be an issue since the data is just lat longs? Unless its a location you want to keep personal?

#

@sand inlet

sand inlet
#

yep

#

if it's an issue if someone looking at the network can read that location then that's an issue beecloseloaf

#

but if you're not concerned about the data being private it's fine

clever delta
#

coolio

sand inlet
#

...well, there's actually another potential issue with HTTP: someone with access to the network could also give you fake results

#

but if you're also not concerned about that then it's fine

clever delta
#

Its just a discord bot

#

Β―_(ツ)_/Β―

sand inlet
#

in that case it sounds like none of it is particularly important

clever delta
#

correct

vapid nymph
#

hm

#

@viral parrot thanks for the suggestion

#

uh

#

@muted pebble thanks for the suggestion

muted pebble
#

@vapid nymph what suggestion

vapid nymph
#

cock pit

low chasm
#

Guys, I have a question. Say I have the below print("HI") Would a stack based interpreter turn it to something like this? LOAD_VALUE PRINT_VALUE And if it does, when the instructions are being executed, how does the VM get access to the Hi inside of the print?

fading sequoia
#

No I ain't lol

#

I dunno

#

LOL

low chasm
#

lmfao

rough sapphire
#

@fading sequoia why do you stuff hashtags like #HTML?

#

ok

#

makes sense

#

#womenwhocode pithink

gritty zinc
#

!e

import dis
dis.dis("print('hi')")
royal lakeBOT
#

@gritty zinc :white_check_mark: Your eval job has completed with return code 0.

001 |   1           0 LOAD_NAME                0 (print)
002 |               2 LOAD_CONST               0 ('hi')
003 |               4 CALL_FUNCTION            1
004 |               6 RETURN_VALUE
low chasm
#

Oh ok, thanks :D And the values get appended to a constants table, right?

gritty zinc
#

so what actually happens here is:

  1. An instruction LOAD_NAME with argument print - it puts that name (which resolves to a function pointer) to the stack
  2. An instruction LOAD_CONST which adds "hi" to the stack
  3. An instruction CALL_FUNCTION with parameter 1, which I assume means "take 2 (the argument + 1) elements, call the last one as a function with the rest as arguments".
gritty zinc
low chasm
#

Isn't it?

gritty zinc
#

I should probably read that one day

low chasm
#

Ooh cool

tranquil orchid
#

easily hitting 90s on the split board now

acoustic moss
#

damn

inland wolf
#

banjo

visual spire
#

amogus

scarlet wind
#

this meme sucks

inland wolf
#

no

mellow spire
#

oh nice, my maximum 93 on qwerty

#

in 15 seconds

#

and 91 in 30 seconds

finite sierra
#

Imo it's quite easy to make quick bursts in the 15 second tests

#

I get bored midway in the 1 minute test

inland wolf
#

lol

topaz aurora
#

Restyled my contact cards a bit

#

A bit more consistent with my 404 page

noble atlas
#

cool

topaz aurora
#

Not quite sure what to do about this though, I feel like I need to either push the title in or pull the content out

topaz aurora
#

The title keeps aligned with the other sections so I can't quite do that

#

Well, on desktop at least

#

I could do this but the asymmetry is meh

#

Maybe if I had an image on the right side, which I don't

#

or, I could just center and be done with it Β―_(ツ)_/Β―

acoustic moss
#

mhm

gritty zinc
#

what the

#

I got Transformers to check out GPT-2

last mantle
#

if only there was a dark mode πŸ˜”

gritty zinc
#

and in the first phrase on the testing prompt from the tutorial, it calls out Rust

#

{'generated_text': "Hello, I'm a language model, I didn't want to work with another language like Rust. I'm making more time for Rust. I just"}

topaz aurora
last mantle
#

goooood

topaz aurora
#

I seem to have grown fond of this bordered style

last mantle
#

ya kno

#

i like the login to be separate

gritty zinc
#

{'generated_text': "Hello, I'm a language model, so I'm very familiar with basic syntax, and things like that. If you come to this, I know most of your language skills (it doesn't matter what language you speak), but just because we are"}

#

scary

strange musk
#

There are competetions and once you see the hastag, you know its pointless joining as a man

modern haven
twin charm
#

monkey type ig

scarlet wind
#

lol

gritty zinc
# inland wolf bruh wtf

If you think this is bad, check out this thing gpt2-medium generated:

Greetings, human. I'm a language model, and I'm also the leader of the most violent, anti-people crew in New Eden. I've decided to disband my corp, and turn my attention towards bringing our new alliance into power. After your request, it should go without saying that no ship of mine or any ship belonging to your organisation can appear again in your local systems. I expect it only those from my alliance who have proven themselves capable of standing with my cause. So, we'll all gather with my new crew in the skies of New Eden and fight for the good of New Eden. Farewell, human." He then left the console.

In a message sent through the EVE System Slack, Liao's followers explained that he was "not done with you yet." As a result, they decided to form into an entity named the Valkyr Alliance.

Several months after his departure, Liao received a new console. Shortly after launching, he told

#

or this:

Greetings, human. I'm a language model, a linguistic researcher, trying to develop a new kind of language. I'm going through quite a big learning curve. You've met me.

I am a language model using an artificial neural network model of conversational fluency. As you may already know, the only language in the world without a grammatical stem, to translate something to us is in Esperanto. At the moment, in Esperanto, the grammatical stem seems to be an object; as such, it is very hard to produce intelligible sentences like: 'Mate, what is the fruit on your plate?' Without this "instrumentality" - the idea that you can say something without saying, for example, 'I buy them', this is something that needs to be studied and tested in many languages.

That said, I'd like to propose an alternative approach. Instead of using a standard grammatical stem, we could actually express ourselves using an

strange musk
#

what are you fine-tuning @gritty zinc ?

low chasm
#

my code isnt compiling D:

undone helm
#

pithink this guy is so adorable

oak tangle
#

One of the best moments in the series

sterile sapphire
#

I respectfully disagree

#

having Abby kill him with a golf club is not the way I expected him to go out

oak tangle
#

I think that's driving the message home in a way that's very in line with the series

#

This is a really messed up situation in a messed up world

#

It's not a fairy tale

sterile sapphire
#

I would have been fine with Joel dying any other way

oak tangle
#

Any other way?

sterile sapphire
#

he could have turned into one of those zombie things

#

it just feels uncharacteristic of Joel to just be like oh yeah I'm gonna help you

#

and then he trusts Abby

#

the Joel from the last game literally ran people over because he thought they were faking needing help

#

I just don't understand why they made him so naive

oak tangle
#

I don't think he was particularly naive in that sequence, from the sequence of events that happened

#

It's easy to reason in hindsight, like with so many things

#

In hindsight, knowing what's going to happen, his decisions are naive

#

but up until that point, it wasn't exactly that weird to see him help here in the game

sterile sapphire
#

but when those people were asking for help in last of us 1 he just said they were faking it

#

bc he did it before

oak tangle
#

The situation here was quite different in that he has been living in a city for a long time that had been taking in people that wandered into the area

sterile sapphire
#

I disagree with Ellie even letting Abby survive

#

it would have sold the message more if Ellie had just outright killed Abby

#

showing vengeance corrupts everyone

#

when Tommy introduces Joel and him to Abby Abby's attitude completely changes

oak tangle
#

Those streamers just look like they wanted a nice little story but got an actual story

sterile sapphire
#

and also there's 12 or so armed people inside the building

#

there's no way why Joel wouldn't have been on high alert

oak tangle
#

Just like all the people who couldn't handle the events in RR Martin

#

Sometimes stories are just that, cruel and horrific

sterile sapphire
#

and it's not like Joel is incapable of taking out large groups

#

Joel literally wiped out the entire hospital

#

on his own

tardy rain
#

Tlou didnt need a part 2

sterile sapphire
#

yeah that too

oak tangle
#

I felt the events unrolled quite naturally

#

In that beginning sequence that is

#

There are some twists in the later parts of the second game that were a bit weaker to me

sterile sapphire
#

Nope I refuse to believe he was that naive

oak tangle
#

At which point?

sterile sapphire
#

he enters a room with 12 armed people

#

and doesn't suspect a thing

oak tangle
#

They don't suspect a thing at that point yet

sterile sapphire
#

he sees Abby's entire display of emotions change when his name is mentioned

#

and he doesn't suspect a thing

#

that's ridic

oak tangle
#

And he wasn't exactly free to not enter that compound

sterile sapphire
#

I just refuse to believe he gets caught like a deer in headlights

oak tangle
#

He does suspect a thing

sterile sapphire
#

that is not how I envision Joel

oak tangle
#

but he's shot in the knee right after that atmosphere change

sterile sapphire
#

he shouldn't have willy nilly followed Abby in either

rough sapphire
#

wats lemon doing pithink

sterile sapphire
#

he doesn't even need to save her

oak tangle
#

He didn't have a choice. They were chased by a horde and they made it out by making it inside

#

I think the events leading up to that point, when you don't know what's going to happen yet, make sense

#

They certainly made sense to me the first time around

#

Obviously, in hindsight, you just don't want to accept what happened

#

but I just now watched a playthrough again

#

And it really does not feel naive or unnatural way before it happens

sterile sapphire
#

let's just agree to disagree

oak tangle
#

We're biased now; we know what's going to happen

#

It's difficult to deal with a main character you're rooting for going out like that

#

But, for me, it fits the story

sterile sapphire
#

I didn't root for him I thought what he did was wrong

#

when he saved Ellie

#

I thought what he did was wrong

#

but I still don't think beating the guy who killed your father to death with a golf club solves anything

oak tangle
#

surely not, but that kind of irrational behavior is very real

#

It happens out here, in the non-game world as well

vapid nymph
#

hello seba

high haven
#

πŸ’€

vapid nymph
#

Aight how many of these names are @bleak lintel related

bleak lintel
#

lol

vapid nymph
#

Yesterday was 2/3 joes

#

Today is a joe

#

Oh right

vapid nymph
bleak lintel
#

to what

vapid nymph
#

To not click on, but looks interesting enough that I want to, but isn't, but it is, and then I end up clicking

bleak lintel
vapid nymph
#

πŸ‘€

#

That used to be a 404, did it not...

topaz aurora
#

Fitting

twilit shore
#

Lol

acoustic moss
sour forge
#

made a discord clone using Tailwind CSS. How does it look?

last mantle
acoustic moss
#

i didn't expect it tbh

#

you don't really see 'good' people die that early too often

last mantle
#

ehh yeah jeoffrey was evil

lunar ingot
#

hm

mellow spire
#

tada my highest

inland wolf
last mantle
#

loo

inland wolf
#

i should have learnt by now

#

that i shouldnt click joelinks

mellow spire
#

lol, you are a slow learner

inland wolf
#

Ok

#

lol

young shoal
mellow spire
#

nah, i do 30 usually

young shoal
#

o

mellow spire
#

opened mokeytype and 15 was set

#

so just did it

young shoal
#

o

mellow spire
#

mainly i miss the space and i get errors

#

i haven't tried 60 and 120 from a while, lets see what is the current score

inland wolf
#

punctuation makes my wpm go πŸ“‰πŸ“‰

mellow spire
#

i do withou punctuations

bleak lintel
gritty zinc
scarlet wind
mild pelican
#

How can i put this back? Plz help

ivory gyro
#

lmao you ripped the entire slot out

#

absolut madlad

scarlet wind
#

bru

modest meteor
#

Can you use toothpaste as thermal paste?

gritty zinc
#

only once

modest meteor
#

thanks

inland wolf
#

is that a long term solution

frozen coral
#

Linus tech tips did a good video on this

#

Tooth paste was better than using too much normal thermal paste

last mantle
#

doesnt mean anything tho

tranquil orchid
#

that is quite the progress

gritty zinc
#

I took way too long staring at the plot trying to figure out what it is before I thought to check the axes

narrow pecan
young shoal
#

very fast :)

surreal otter
#

Over how long?

#

These are fun

fading sequoia
twin charm
#

hi.

high zealot
#

Hi

twin charm
#

give me a jumpscare disclaimer

#

that is, if there is one

sterile sapphire
#

nope

#

I refuse to watch that

twin charm
#

I'm at 0:26

sterile sapphire
#

I saw a tiny spider in my room and I refused to go in my room for the entire day

twin charm
#

fuck 0:59

sterile sapphire
#

I hate arachnids and bugs

twin charm
#

lmfao I watched it fully

#

🀣 🀣 πŸ’― πŸ™

#

I cant believe BBC put that thing

#

in the end

inland wolf
#

omfg

#

when bbc is sus

twin charm
#

is it edited? or did bbc really put that in the end

inland wolf
#

of course its edited

#

unless

ivory gyro
#

doesnt look edited

twin charm
#

unless bbc is really that kind of company

#

that would really do it

inland wolf
#

lol

#

if bbc did do that

twin charm
#

srslly

#

would they

inland wolf
#

ok

#

ikr

twin charm
#

ok

#

.topic

median domeBOT
#
**If you could be anyone else for one day, who would it be?**

Suggest more topics here!

inland wolf
#

not u

#

B)

#

as in the bot

#

lmao

twin charm
#

Bill Gates.
to upload the source code of Windows to github so yk 😎 contributions from all people and privacy breach exposé

#

.topic

median domeBOT
#
**What's your favourite kind of soup?**

Suggest more topics here!

twin charm
#

what are soups btw

#

curry?

#

.topic

median domeBOT
#
**Tea or coffee? What about milk?**

Suggest more topics here!

twin charm
#

I'm sikk and tired of drinking tea everyday morning and evening.
I love coffee
I puke whilst smelling milk and even worse when its coconut milk

last mantle
#

what did i miss in the vid?

twin charm
#

maybe you didnt watch the whole video

last mantle
#

oh

twin charm
#

or you are living under a rock so as to not to understand the joke (jkjkjkjk)

last mantle
#

i saw the discord preview

#

and i muted it

#

is it the audio?

twin charm
#

find out for yourself. I dont want to ruin the joke

last mantle
#

hmm k

inland wolf
#

yes

fading sequoia
twin charm
#

ur sus

sterile sapphire
#

I don't even feel like it's Whedon's fault justice league was crappy

#

it's WB's

#

they hired Whedon to make it more like a Marvel movie

#

and he just did what they asked

#

and then they made him the fall guy

#

and now everyone hates Whedon

acoustic moss
#

whedon made a couple of marvel movies too didn't he?

sterile sapphire
#

yes

#

age of ultron was one

acoustic moss
#

hm

sterile sapphire
#

it was terrible

acoustic moss
#

lol

sterile sapphire
#

the worst avengers movie I ever saw

#

but even with all this set up from the new zack snyder justice league cut

#

I don't think there will be a justice league 2

#

but I am open to being proven wrong

#

they did invest 70 M into this cut

#

it wouldn't make sense to invest all that money and then do utterly nothing

vapid nymph
sterile sapphire
rough sapphire
#

is it just me, or are you guys bad with naming your projects

ancient minnow
#

@rough sapphire well you havent seen the filenames yet. real_test_socketconnection_v1_3_realversion.py

rough sapphire
#

... you can trust JoeCool tho !!!!

#

lol

rough sapphire
#

lol

strange musk
#

R/jokes

A politician visited a village in Haiti after a devastating hurricane.

Upon arrival, he asked what their needs were.

β€œWe have 2 basic needs sir,” replied the villager.

β€œFirstly, we have a hospital, but there's no doctor.”

On hearing this, the politician whipped out his phone, and after speaking for a while he reassured the village leader that the doctor would be there the next day.

He then asked about the second problem.

"Secondly sir, there is no phone coverage anywhere in the village.”
rough sapphire
#

.

winter terrace
fading sequoia
#

Will do

vapid nymph
#

tbf I read back and each post is different so uh

#

I actually don't really care and I'm not staff so

vapid nymph
fading sequoia
#

Ok, but I'll stop anyways

sour forge
#

I have this code in python

# file1.py
data = 'hello world'
# file2.py
from file1 import data
print(data)

How would I do the same in Rust? I know I can create a function in file1.rs that will return "hello-world" but I don't want to create a function.

edgy crest
#

if you wont create a function, you wont even be able to use let @sour forge

#

let can only be used inside a function

#

only thing you can use is const

#

not sureif you can add a pub const though Β―_(ツ)_/Β―

#

hm wait i think i did this

#

yeah, you can

#
// file 1
pub const DATA: &str = "Hello World"
``` ```rs
// file 2
mod file1; // the filename
fn main() {
  println!("{}", file1::DATA);
}```
modest meteor
#

does anyone know a good ruby server

sour forge
#

also what is the python equivalent for Trait in Rust?

edgy crest
#

i dont think there is

sour forge
#

:[

edgy crest
#

you could just use inheritance i guess

#

create a class with the trait method

#

and inherit wherever you wanna use

sour forge
#

yeah got it

#

i am learning rust traits so i thought if there was a python equivalent, it'd be easier to understand

edgy crest
#

python is OOP rust is not, so kinda hard to directly compare

sour forge
#

what is rust?

#

procedural or functional?

edgy crest
#

i think its some kind of hybrid lol

sour forge
#

data oriented apparently

edgy crest
#

its has OOP features, but its not exactly OOP, its has functional lang features, but it is not functional

acoustic moss
#

jack of all trades master of none

edgy crest
#

its master of all

topaz aurora
#

Inheritance is evil

lusty cedar
#

why is inheritance evil

sour forge
#

Wtf is use of moved value &self?

#

What am I doing wrong here?

topaz aurora
# lusty cedar why is inheritance evil

It serves no practical use aside from arbitrary examples; over-reliance on it for "inheriting code" says that you probably should restructure the current codebase, provided that it isn't monolithic and beyond saving

sour forge
#

django codebase goes brrrrrr

topaz aurora
#

But I'm not too familiar with Rust so Β―_(ツ)_/Β―

#

or use &mut self instead

edgy crest
#

i think you meant to do self.word.enumerate()

#

and also yes, &mut self

#

you wont be able to use the instantiated object anymore, without &

sour forge
#

@edgy crest I get these now

edgy crest
#

one sec

#

the change_character_at_index is making it more complicated

#

since its just a single line function

#

do you really need it

#

why not just do it directly?

sour forge
#

okay i did that

edgy crest
#

hmm

#

so is enumerate consuming the value

#

let me check its source

#

what is the type of word ?

sour forge
#

basically, I am trying to enumerate over a custom struct named Word. Is that possible (commented out code)?

edgy crest
#

if it applies the Iterator trait yeah

#

but your enumerate is consuming the type

#

hmm

#

try self.word.iter().enumerate()?

sour forge
#

it says not method named iter for struct Word

edgy crest
#

hmm

inland wolf
#

just saying but

#

ur Word struct has only 1 field

#

so why dont u make it a tuple struct

last mantle
#

thank god for self and not this

clear acorn
edgy crest
#

rust

sour forge
inland wolf
#

@sour forge whats that theme u got there

#

also what should happen when u iterate thru ur Word struct

livid sandal
#

(im referring to the name not the contents of the channel)

sour forge
sour forge
inland wolf
#

so it should iterate over the characters?

#

of word.word

sour forge
#

yes yes

inland wolf
#

self.word.chars().iter()?

#

that should return the iterator

sour forge
inland wolf
#

ah ok

sour forge
#

so basically i want to be able to do for letter in word where word = Word { some_data }

inland wolf
#

i see

sour forge
#

have any clue how to do it?

inland wolf
#

u could do word.iter()

#

but im not sure about just word

sour forge
#

oh yeah soory

#

i meant word.iter()

#

the book said I need to implement Iterator trait or something.

#

I tried to but idk how to

inland wolf
#

u already did

#

now just look at the error

#

it will tell u that u need to implement something else

#

well apparently u only need to implement next

sour forge
#

okay i will try it later. thanks

mellow spire
topaz aurora
#

Help me

#

I've fallen into the Haskell rabbit hole

solid pollen
#

Is it... art ? lemon_hyperpleased

#

It looks really good tbh

#

No idea what it does though

graceful basin
#

that low contrast really irks me

tranquil orchid
#

Haskell just confuses me whenever I look at it

#

It looks like art

topaz aurora
tranquil orchid
#

unreadable art

graceful basin
#

this mostly makes sense to me, but I need more context to understand what it actually does

#

also, unsafe bad

jolly tinsel
#

@topaz aurora hey bud I just need to ask something I'm sorry for the ping But I wanna ask this what role will I get If I boost, a classic booster or nitro booster?

#

I'm planning to do a classic boost

#

coz thats what I have

topaz aurora
#

Nitro Booster I believe, although I'm not quite sure as I haven't bought it for myself yet

jolly tinsel
#

ok

ancient minnow
#

hello everyonoe

twin charm
#

sup

sterile sapphire
#

no random memes please

graceful basin
#

@ancient minnow please read the off topic ettiquette in the channel topic

rough sapphire
#

brave yet controversial meme

rough sapphire
acoustic moss
#

Damn thats the symbol of a chad

rough sapphire
#

Lmao

#

\πŸ˜„

ivory gyro
#

github has dark mode? nice

rough sapphire
#

Yeah

#

You need to be logged in though

alpine shuttle
#

python is useful for bruteforcing the answers of my math problem

ivory gyro
#

^ oh lawd he comin

#

might be faster in a list comprehension

values = range(-100, 100)
[(i, j, k) for i in values for j in values for k in values if not i-2*j+3*k and not 3*i+3*j-k]
rough sapphire
#

DEMONS

#

AHH

tardy rain
#

Why the if True tho

ivory gyro
#

just ran it (with an edit) and it is indeed fast

ivory gyro
#

list comprehensions have optimisations because they run at C speed

alpine shuttle
tardy rain
#

I dont see how it helps tbh

alpine shuttle
#

mmmh it's an old habit, here my first statement was a loop so it wasn't necessary indeed

harsh tundra
alpine shuttle
#

yeah I'm too used to automating stuff

gritty zinc
# ivory gyro list comprehensions have optimisations because they run at C speed

listcomps are a bit more optimized than loops, indeed, but I won't call them "running at C speeds"

%%timeit 
lst = []
values=range(-100,101)
for i in values:
    for j in values:
        for k in values:
            if not i-2*j+3*k and not 3*i+3*j-k:
                lst.append((i,j,k))
# 1.15 s Β± 64.9 ms per loop (mean Β± std. dev. of 7 runs, 1 loop each)

%%timeit
values = range(-100,101)
[(i, j, k) for i in values for j in values for k in values if not i-2*j+3*k and not 3*i+3*j-k]
# 1.09 s Β± 33.6 ms per loop (mean Β± std. dev. of 7 runs, 1 loop each)
#

Cython speeds it up by a further 30%:

778 ms Β± 23.8 ms per loop (mean Β± std. dev. of 7 runs, 1 loop each)
#

woah

#

I tried several ways and I think found a blazingly fast one

#
%%cython
def f5():
    lst = [(i, j, k) for i in range(-100,101)
           for j in range(-100,101)
           for k in range(-100,101)
           if not i-2*j+3*k and not 3*i+3*j-k]
    return lst
#

this one is:

6.12 ms Β± 169 Β΅s per loop (mean Β± std. dev. of 7 runs, 100 loops each)

which is insane; like a hundred times faster

#

maybe it got optimized away?..

ivory gyro
#

wow!

gritty zinc
#

nope, it didn't get optimized away, but all the inner loops were made into C loops

#

weird that it took a listcomp inside a Cython function for this to happen

#

actually, I can't know if it didn't get optimized away, hmm, not without reading the asm

ivory gyro
#

finally found what i was looking for but i think it is much slower:

from itertools import product
[(i, j, k) for (i, j, k) in product(range(-100, 100), repeat=3) if not i-2*j+3*k and not 3*i+3*j-k]
#

itertools.product returns the cartesian product

gritty zinc
#

itertools is really good, but product in particular can't really be faster than just for-loops

rough sapphire
#

I really gotta read into itertools some time

gritty zinc
#

itertools is really good for its less-trivial iterators

#

like combinations, permutations, etc

#

they are implemented in C, so you can't make a Python function that matches their speed

sterile sapphire
#

Can someone ELI5 itertools

#

Like what could I use it for

#

Algorithms? Data structures?

gritty zinc
#

also has some helpful iterator-related functions

sterile sapphire
#

what’s a permutation of a collection

gritty zinc
#

!e

import itertools
print(*("".join(map(str,tup)) for tup in itertools.permutations(range(5),r=3)),sep=" ")
royal lakeBOT
#

@gritty zinc :white_check_mark: Your eval job has completed with return code 0.

012 013 014 021 023 024 031 032 034 041 042 043 102 103 104 120 123 124 130 132 134 140 142 143 201 203 204 210 213 214 230 231 234 240 241 243 301 302 304 310 312 314 320 321 324 340 341 342 401 402 403 410 412 413 420 421 423 430 431 432
gritty zinc
#

all 3-length permutations of 0,1,2,3,4 for example

#

you can write your own algorithm for generating those, but it can't be as fast as itertools's, because, well, Python

sterile sapphire
#

interesting

#

permutation is a combination?

gritty zinc
#

permutations are ordered unlike combinations

#

see how 012 and 021 and 102 and 120 and 201 and 210 are all in the list of permutations

#

even though all of them are just one combination

sterile sapphire
#

yeah that's cool

limber goblet
#

Can someone explain what this quote from Ken Thompson means? "Actually, FORTRAN was the language of choice for the same reason that three-legged races are popular."

#

English is not my first language, and neither is FORTRAN.

gritty zinc
#

not the slightest idea what they meant

sour forge
#

Lmao how do I solve this

versed saffron
#

break it into 2+ functions?

sterile sapphire
#

Functions do that?

#

You can have too complex of a function?

#

damn I didn’t even know

versed saffron
#

oh ya god functions/classes

sterile sapphire
#

I have just never seen that error before

versed saffron
#

that's a flake8 error

sterile sapphire
#

What’s flake8

versed saffron
#

linter

sterile sapphire
#

Oh ok

#

yeah I had a problem where my linter kept disappearing in VSC

#

idk how I fixed it

versed saffron
#

yeah it takes a couple hours to fully get vsc set up properly

#

I've just kinda stopped using it

sterile sapphire
#

I’m not really doing projects right now

#

So there is no real use for an IDE for me

versed saffron
#

I've just been using pycharm for pretty much everything

#

if I need a 'scratchpad' for an algo or smthing ill just use the idle

sterile sapphire
#

Pycharm is good too

wise schooner
versed saffron
#

ya and then half of those extensions don't work + conflicting extensions with different languages then half the keybinds don't work nvm setting up custom ones

wise schooner
#

πŸ‘€ all of the extensions worked for me...

versed saffron
#

how many languages do you use?

wise schooner
#

which extensions conflicted with different langs?

versed saffron
#

code runner always gives me issues

#

also c++ is a pain on win in every aspect

wise schooner
wise schooner
versed saffron
#

ya idk it's not bad but id rather use a full ide

#

even if my laptop can't handle one

wise schooner
#

visual studio is a full ide...

versed saffron
#

vsc?

wise schooner
#

and one of the best ones for cpp dev afaik

#

no, full visual studio

versed saffron
#

I like vs ya

#

I want to try out clion tho I really like jetbrain's stuff

wise schooner
#

yes, some ppl i know like it a lot.

#

it uses clang by default i think

#

vs uses msvc because windowsℒ️ lol

versed saffron
#

gotta love windowsℒ️

#

im ngl tho idk what either of those are πŸ˜„

wise schooner
#

compilers lol

acoustic moss
#

@versed saffron Your nickname confuses and scares me.

wise schooner
#

πŸ‘€

#

that's even more cursed

versed saffron
#

although I don't know what it's pointing to.
story of my life

acoustic moss
#

Lol

open kettle
#

anybody there

inland wolf
#

not rn

winter terrace
#

should i pull the all-nighter?

#

is there such a thing where you're so tired that you're not or am i dying?

rough sapphire
#

Yes

last mantle
#

py uses it too :(

#

ah

#

nvm

edgy crest
#

lol

inland wolf
#

lol

topaz aurora
#

tfw part of your CI is building the Haskell compiler

#

Honestly takes faster than I thought it would

rough sapphire
#

hello

#

how do u do

#

me ok

#

this server bad

#

ppl baf

acoustic moss
#

ok

low chasm
#

lmfao

wary spire
#

Seems about right

inland wolf
#

bruh

twin charm
wary spire
#

This server is my guilty pleasure

twin charm
#

why is it your "guilty pleasure"? if I may ask

#

tf is guilty about it πŸ‘€

vapid nymph
#

Tis my secret shame

twin charm
#

oo

sour forge
#

in python I can do assert a == b == c == d to test equality but rust has asserteq! which accepts only 2 arguments. Do I have to write a loop to achieve the same functionality of asserting 4 variables to be equal?

tardy rain
#

It would be fairer to compare assertEqual to assert_eq!

#

Both only take 2 arguments

#

Technically a == b == c == d is a single argument

#

Also apparent assert_eq uses PartialEq which doesnt guarantee transitivity

#

So you have to use multiple assert_eqs or make a new macro to do that for you

sour forge
#

but the use case sounds common enough to me, doesn't rust provide a convenience function to do it?

#
assert!(a == b &&  b == c && c == d)

This should work ig

#

but still seems hacky

tardy rain
#

Idk, looks fine to me tbh

edgy crest
#

ye

#

rust doesnt support chained operation

solid pollen
edgy crest
#

the song aint loaded yet for me

#

but i hope its not the weeknd

#

i am out

solid pollen
#

Lmao

acoustic moss
twin charm
#

the hills!

#

OLD

quick ledge
#

it is a nice song πŸ‘Œ

sterile sapphire
#

that was the darkest weeknd music I ever heard

#

and it was great

#

I am so desperate to write better essays

#

I am deadass reading books on how to write better essays

#

bc I am tired of getting Cs on every single essay I write

low chasm
#

It cant do anything except printing though

wheat lynx
#

nice πŸ˜ƒ

wheat lynx
low chasm
#

Lol

low chasm
alpine shuttle
#

you should write your readme because we have 0 info about how it works

#

cool tho

low chasm
#

Lol, i barely just started, so its unusable at this point

#

Can't do much of anything except print numbers

alpine shuttle
#

I still want to know how to print in Lite

low chasm
#
print(10)
#

Very python like syntax

alpine shuttle
#

Revolutionary

low chasm
#

Ik, height of creativity

rough sapphire
#

@low chasm how do I install?

low chasm
rough sapphire
#

i'll be the guinea pig for your new features

low chasm
#

Lol

rough sapphire
#

but still

#

i'd be happy to

low chasm
#

xD thanks :D

rough sapphire
#

so cargo build once I clone?

low chasm
#

Yes

#

And then cargo run

#

Make sure your inside the src directory

rough sapphire
#

is it compiled? or?

#

this is slow af

low chasm
rough sapphire
#

ok

low chasm
#

Courtesy horrible rust code

low chasm
#

in a bytecode VM

rough sapphire
#

niice

tardy rain
#

Ofc it is, its an unoptimized toy project and you didnt even build with optimizations

low chasm
#

mhm

#

I need a working version first

#

I'll make it optimized later

tardy rain
#

Pretty good, i was thinking of trying my hand at a vm for shits and giggles and possibly maybe learning

rough sapphire
#

I got too much warnings

#

!paste

royal lakeBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

low chasm
rough sapphire
low chasm
#

Eh, those'll be gone later

rough sapphire
#

lol

low chasm
#

As for the variable warnings, I'd prefer to have my opcodes not be uppercamelcae

rough sapphire
#

why πŸ“

low chasm
#

Eh, what looks better LOAD_VALUE or ```
LoadValue

graceful basin
#

SCREAMING_SNAKE_CASE is generally the convention

low chasm
#

Cool

graceful basin
#

but in my lang, they are PascalCase since they are enum members in haskell

low chasm
#

Oh cool

harsh tundra
low chasm
#

Lol

harsh tundra
#

hm, channel names can only be lowecase :c but "screeming snake case" is still worth its own otn, even if lowercase

graceful basin
#

!otn a SCREAMING_SNAKE_CASE

royal lakeBOT
#
Bad argument

Channel name must only consist of alphanumeric characters, minus signs or apostrophes.

#
Command Help

!otname add <name>
Can also use: otname a

*Adds a new off-topic name to the rotation.

The name is not added if it is too similar to an existing name.*

graceful basin
#

why is that restriction there

#

_ is a valid part of channel name

sterile sapphire
#

can anyone add off topic channel names

#

or is it just mods

graceful basin
#

only mod+

rough sapphire
#

!otn a

sterile sapphire
#

oh

#

ok

graceful basin
#

!otn a SCREAMING-SNAKE-CASE

royal lakeBOT
#

:ok_hand: Added 𝖲𝖒𝖱𝖀𝖠𝖬𝖨𝖭𝖦-𝖲𝖭𝖠π–ͺ𝖀-𝖒𝖠𝖲𝖀 to the names list.

ivory gyro
#

big boy club

#

πŸ‘Ά 🍼

austere forum
#

HMmmmmmmm

#

I think i found a way to break the system

#

GG

velvet portal
#

what-is-the-airspeed-velocity-of-an-unladen-swallow?

vapid nymph
#

It checks edits

rough sapphire
#

my language is called sycamore

sturdy nymph
frozen coral
#

We have a whitelist of invites that we allow.

low chasm
#

How can I find the index of the second to last value inside a vec in rust?

frozen coral
#

.len()-2?

#

That's a complete guess btw

low chasm
#

Hm

#

Im getting an overflow error

twilit shore
#

...

#

um

#

never thought about it

upbeat jackal
#

Would it even be morally and politically correct to make an AI?

low chasm
#

Uh

twilit shore
#

start a blog bro

upbeat jackal
#

Why bro

twilit shore
#

scroll up

#

Previous message

#

Link

upbeat jackal
#

Yea i know thats why, but why?

twilit shore
#

it was kinda a joke :/

#

Ya know because you had like Socrates level theory

upbeat jackal
#

Lmao

#

Thanks

twilit shore
#

!otn Socrates-like-theory

upbeat jackal
#

What does that command do?

young shoal
#

errors

twilit shore
#

Adds a name to the list of off topic channel names

upbeat jackal
#

Uh what?

#

List of off topic channel names?

#

What does that do?

#

Im new i dont know these things

rough sapphire
#

arent u owner of Volleyball 4.2

upbeat jackal
#

Never heard of that

#

So would be hard

#

@rough sapphire

tame terrace
#

@upbeat jackal it's explained here:

#

!offtopic

royal lakeBOT
upbeat jackal
#

Oh lol

rough sapphire
#

Does anyone find odd numbered fonts more appealing than even numbered fonts? Or am I just a weirdo?

sterile sapphire
#

#BatmanvSuperman: Dawn of Justice Ultimate Edition available to own on 4K Ultra HD Blu-ray now.

SUBSCRIBE to Warner Bros. Entertainment: http://bit.ly/32v18jf

Connect with Warner Bros. Entertainment Online:
Follow Warner Bros. Entertainment INSTAGRAM: https://www.instagram.com/warnerbrosentertainment/
Like Warner Bros. Entertainment on FACEBOO...

β–Ά Play video
#

this looks so badass

#

it makes Batman look really evil too

#

with the music and all

rough sapphire
mental bison
#

Is grammarly high?

#

yeah thats pretty clear the message I was trying to convey in my random string of characters

jagged fog
#

@jagged coral Its the most used text encoding in the world

#

It lets you put cool symbols and other stuff

jagged coral
#

oh

#

tysm

jagged fog
#

Python3 is in UTF-8 you don't have to do anything to enable it
however in Python2 you have to put
# -*- coding: utf-8 -*-
in the top of your script *to enable it

last mantle
#

o

tame arrow
#

Can anyone help me with node js

tame arrow
#

Why my fetch function take too long to respond

#

First fetch works quickly but next takes too much time

#

Ok

rough sapphire
#

interesting, later he uses numpy and pure python math as fastest solutions

#

Can't watch that right now, what's the fastest solution exactly?

#

Then how is that the fastest way of looping?

acoustic moss
#

lol

rough sapphire
#

Now i feel like the video is a click bait

#

When I've access to non limited internet access again haha

#

Mobil Traffic is heavily limited on my plan

#

3GB a month is not much

graceful basin
#

there is a reason math.factorial is much faster than any naive factorial function in any language for large enough number

rough sapphire
#

There are no decent mobil boardband contracts

#

Nah, mobil discord is fine

#

Yeah I guess, it's only for math problems where a formula exists / solvable with numpy array

topaz aurora
#

Which is also why the numpy version is quite fast; the same overheads for while also applies for for. Ultimately though, just using math is the most trivial solution.

rough sapphire
#

Math is always better than loops

#

I mean, unless there's recursion in there then we're basically looping again

#

But obviously if you don't need to loop not looping is the best

twin charm
#

nice ot name 🀣

noble atlas
#

Little scary but nice πŸ˜…

twin charm
#

its scary when you create a mental image of someone doing it 😳

twin charm
#

indeed

ivory gyro
#

oh LAWD he COMIN

feral yew
#

a chonk

twilit shore
#

MEGAH CHONK

edgy crest
#

lol

mellow spire
#

@paper sequoia here

#

did you see the init file i linked?

#

the should_rotate function in that?

#

what did u understand by that?

#

yes it handles whether should the logger file be rotated or not

#

yeah

wise schooner
#

one of the comments suggested this i think

rough sapphire
#

Let me see what numba is...

wise schooner
#

ouch

#

probably will just optimize out the loop lol

rough sapphire
#

Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code.

wise schooner
#

JIT 😎

rough sapphire
#

Normal JIT does not work with NumPy or why did they add that in the statement πŸ€”

wise schooner
#

pithink what is normal JIT?

rough sapphire
#

Idk, ... pypy?

wise schooner
#

oh it works

rough sapphire
#

I never used JITs

wise schooner
#

numba outperforms pypy in it's use cases (by a lot sometimes) :D

wise schooner
low chasm
#

JITs are cool

rough sapphire
low chasm
#

My name is aboo :D

wise schooner
#

JITs gud stuff

#

which makes code go brrr

low chasm
#

Mhm

rough sapphire
honest hare
rough sapphire
#

I took a template and added the text, lol

mellow spire
#

you need to import annotations from future

wise schooner
#

__future__

#

lol

mellow spire
#

not sure, you can just remove the annotations ig

#

The error happens because of the annotation, not sure how to fix it

#

On gurkbot, I fixed it my just importing annotations from future

#

Why, annotations aren’t really needed

#

Another fix is just keep it typing.Any

twin charm
#

is it possible to install pip by doing "sudo apt install pip"?

#

I'm using linuxmint

carmine niche
#

although

twin charm
#

o thanks

carmine niche
#

make sure to sudo apt update first

twin charm
#

what does that command do

#

update apt?

#

or update the whole os

carmine niche
#

it updates the registry cache

#

basicallyyyyyy

twin charm
#

o k thanks

carmine niche
#

apt keeps a registry of the available packages and their current versions

twin charm
#

hm

carmine niche
#

so that when you install it knows which version to look for

#

but

#

it doesn't keep itself updated

#

so if it hasn't updated for a while then you won't be getting a recent version

low chasm
#

aaand Hi :D

twin charm
#

oh

#

the problem is that I have to install pip everytime I open my pc πŸ₯΄

carmine niche
#

hmm

#

that is weird

twin charm
carmine niche
#

how do you install pip

twin charm
carmine niche
#

what

twin charm
#

yeah usb

low chasm
#

oof

carmine niche
#

oh

#

why do you do that

twin charm
#

I installed sublime text and git many times this week 🀣

low chasm
#

Lol

twin charm
carmine niche
#

sad

twin charm
#

cant partition it to dual boot it

carmine niche
#

why not

low chasm
#

Full hdd?

twin charm
#

its like 1.98 <-> 2.2gb left. and the iso is 2.8 gb

twin charm
low chasm
#

Oof

carmine niche
#

why um

twin charm
#

windows took real good care of it 🀣 πŸ™Œ

low chasm
#

Hm

carmine niche
#

can't you clean it up?

twin charm
#

like erase windows?

carmine niche
#

are you sure you need all of that stuff lmao

#

nono

#

like

#

get rid of unnecessary garbage

low chasm
#

How much space is your hdd?

twin charm
#

28gb total. and just with the basic installation of windows, it was 7gb left

carmine niche
#

oh

#

i see

#

that is.. quite small

#

i'm honestly surprised windows even fit on that

low chasm
#

Can you afford a 500gb hdd?

#

Should be around 20 dollars

twin charm
#

and along with a shitty ms office. like powerpoint, excel and word
and kaspersky which is very heavy

low chasm
#

If you can, stick it in your laptop?

carmine niche
#

well

#

an hdd probably wouldn't fit in a laptop qwq

twin charm
#

No. my mother took this to a pc service center and when they inspected, there was only 1 slot for hard disks

low chasm
#

Remove the original hdd

#

Replace it

twin charm
low chasm
#

Oof, doesn't your dad use the laptop aswell?

twin charm
#

even if I could replace it I need a new harddisk right.

twin charm
low chasm
#

Convince him that it'll be a great upgrade

twin charm
#

only once a month

low chasm
#

Oh oof

#

Can he use libreoffice instead?

#

If you just remove windows

twin charm
low chasm
#

I replaced my SSD in my laptop, and transferred windows over

twin charm
#

hm

low chasm
#

Just copy and pasted my windows install into another disk lmao

twin charm
#

anyway. When a get a job.. a good pc is the first thing I'll buy

low chasm
#

Mhm, it'll be a good upgrade

twin charm
#

atleast one with more than 2gb ram πŸ™Œ πŸ’―

low chasm
#

Lol

twin charm
#

libre office is dope. I made slide shows for my homework once using it

wary spire
#

Buy a tower and upgrade it lol

low chasm
#

Can you dad use that instead of excel?

twin charm
#

but I had to convert to .pptx so that my teacher who uses the shitty os named windows can open it 🀣

low chasm
#

If he's set on using excel, there are ways to get ms office running on linux

wary spire
rough sapphire
wary spire
#

Fair enough

twin charm
low chasm
#

oh lol

wary spire
#

SAME

twin charm
low chasm
#

Probably means pc

wary spire
twin charm
#

I see.

wary spire
#

They can be upgrade I have an Inspiron 3670 as my starter

low chasm
#

If you don't game, 400 - 500 dollars should get you a very good upgrade from your current setup

twin charm
#

I have an intel celeron

wary spire
#

Yes

#

Core?

last mantle
wary spire
#

I think I have an i3 v7

low chasm
#

Cool

#

I daily drive an i5 10400f

wary spire
#

Not the best

#

And wow

low chasm
#

Lol

#

A gaming PC was an amazing upgrade from my laptop

wary spire
#

Lol

last mantle
#

i have a i7 but i dont wanna use it

twin charm
#

I'm waiting for april 14th tho.

low chasm
#

Whats happening on April 14th