#ot2-the-original-pubsta

652 messages · Page 66 of 1

odd sphinx
#

hmm

#

alrigt

hazy laurel
#

dare I quote the ArchWiki

odd sphinx
#

i love how everything is nicely going into my d drive

#

where its supposed to

hoary basalt
#

I'm not

odd sphinx
#

Foreign accent syndrome

hoary basalt
#

Russian German I don't even know

#

it's... Rare? wow am luck hah lucky me ahah

median blade
#

@hazy laurel

#

which

hazy laurel
#

um

#

I'd suggest p10k tbh

odd sphinx
#

ayo

#

i just setup zsh

#

with a cool prompt

hazy laurel
#

p10k, right? :)))

median blade
#

i prefer starship

#

better colors

#

heh

hazy laurel
#

huh

odd sphinx
#

ez

#

that green is chefskiss

hazy laurel
#

:[

#

love p10k

odd sphinx
#

what is that

#

i was just using regular zsh prompts

hazy laurel
odd sphinx
#

oh

#

interesting

hazy laurel
#

lol

#

I have that with transient prompt and stuff

odd sphinx
#

i have settled with a blue prompt for arch

#

because its logo is blue

hazy laurel
#

lol

#

that's what I myself did

#

made everything blue

#

but with openSUSE, not too many things are green so now everything is purple

odd sphinx
#

hey

#

how do i get "syntax hihglightinh"

#

in zsh

hazy laurel
#

um

#

install the plugin

#

zsh-syntax-highlighting

odd sphinx
#

o

#

pacman?

hazy laurel
#

no

#

you gotta git clone

odd sphinx
#

dang

#

in that case

#

i will do it tomorrow

hazy laurel
#

lol

odd sphinx
#

bruh

#

arch didnt have git preinstalled

hazy laurel
#

it never does

odd sphinx
#

lol

median blade
#

linux is fun

odd sphinx
#

yes

#

ro

#

bri*

#

bro*

median blade
#

brij

hazy laurel
#

yes

odd sphinx
#

lol

#

the last 7 messages had less than 4 letters

hazy laurel
#

look at me go

lament kestrel
#

Lol

echo fern
#

behold

hazy laurel
#

O.o

median blade
hazy laurel
#

but I don't even use Twitter

odd sphinx
hazy laurel
odd sphinx
hazy laurel
#

:[

eager schooner
gusty rivet
#

@raw lion hey man 👋

raw lion
#

heyo

#

so yeah basically I'm like

#

not rich

#

so I'm waiting for GPU prices to drop but idk when that would approximately happen I've read online it'd be like 4-6 months

sturdy relic
#

the gpu market will come back when etherium transissions from proof of work to proof of stake

gusty rivet
#

Yeah I'd say it's gonna be longer than 6 months, I've heard estimates of winter 2022

#

Imo tho I think summer next year will be mostly stable

sturdy relic
#

its as always very volatile, but it feels like it will be rushed, so im not so sure about the winter 22 estimate. even though i personally think thats a more realistic date

gusty rivet
#

i hope it gets resolved sooner, if VoidForce's sources are right about 4-6 months that would be great

#

seems unlikely tho

#

i see a lot of people complaining that the miners are driving up prices, but i thought it was that we've been this close to the max turnover for silicon for ages, and with COVID-19 putting a lot of factories on hold we've missed out on a few $bln worth of processors

wide totem
#

Hello eivl, wsb

upbeat sandal
#

Something that a lot of people underrate is the flavor of the brew water. Each cup is still going to be mostly water, and if you don't like the taste of the brew water, it's not likely that you'll enjoy it after brewing coffee with it.

hidden kernel
#

oh i see the name lol

upbeat sandal
#

The shape of the cup matters. If you use a cup with a broader rim, the stream of coffee with likewise be broader and cover more of the tongue

#

Likewise, if you use a cup with a narrower rim, the stream will be more focused on the center of the tongue

toxic ginkgo
#

Which is preferable?

upbeat sandal
#

matter of personal taste, I guess.

#

while I don't recommend just sitting around sniffing your coffee, using a cup that surrounds the nose will trap some of the aromatics.

hidden kernel
#

what do you use for brewing?

upbeat sandal
#

What is this? Stelercus's coffee dialogues?

#

I use an aeropress though.

#

Unlike drip brewers, which are used primarily for convenience, the aeropress is an immersion brewer

hidden kernel
#

what's the difference between that and a french press?

upbeat sandal
#

so drip brewers have a slow trickle of water that passes through a bed of coffee, whereas with an aeropress, all the water and all the grounds hang out together, and then you press the water through a filter.

upbeat sandal
#

so it's actually a vacuum inside the chamber at the end.

hidden kernel
#

what does that get you?

upbeat sandal
#

the thing I don't like about french presses is that a lot of oil (and sometime fine grounds) gets through the filter

#

and coffee oil doesn't taste good. but some people like the added texture.

mental idol
#

Just one message since 1969 Discord? rooHmm

cerulean panther
#

lol, discord does that sometimes

#

goes back to 1970

#

because of the unix epoch probably

mental idol
#

wants to go back to simpler times rooDerp1

wide totem
#

fuck the about me's

median blade
hoary basalt
#

HA

steel eagle
mental idol
odd sphinx
#

target acquired

upbeat sandal
#

A lot of people confuse sour and bitter. However coffee is not always bitter, and bitter isn't necessarily bad.

#

"sour" is also not necessarily bad. Acidity is actually quite nice.

dusky cliff
#

sour coffee?

#

oh nvm its supposed to be a monologue, sorry for the interruption

upbeat sandal
#

Coffee can be "sour" in the way that citrus fruits can be "sour".

#

People generally like the acidity of citrus.

wicked hollow
#

I've been making a lot of cocktails at home since lockdown started, and a huge portion of my bar is bitter things

#

Bitter can be very nice

wide totem
#

@languid osprey stop converting to rust

languid osprey
#

YES YOUR RUST NOW

#

Everyone will be rust

#

Haha

dusky cliff
languid osprey
#

Why not you

#

Become rust

#

Give in

odd sphinx
#

accept ur fate

languid osprey
#

Hahastinky you can do it

#

I believe in you

odd sphinx
#

ikr

wide totem
#

@tranquil ridge hey i think i found someone with your username

#

in the rust server

tranquil ridge
#

yes

dusky cliff
#

damn, he has the same pfp too ‼️

odd sphinx
#

yo i got python working on opensus

#

finaly

woven hornet
#
int n = 50;
string s = "HI!;
printf("%p", &n);
printf("%p", s);

i dont rly get why a string can be seen directly as a pointer with the address of the first character in the string
how's s different from n when we want to print the pointer

#
    int data[3] = {10, 20, 30};
    printf("%p", data);
    printf("%p", &data);```
#

and i think both lines give the same values

jovial island
odd sphinx
#

hm

woven hornet
#

oh ok i see

#

can i ask i find it abit weird that string data type doesnt exist in c, but %s still exist in c

ancient whale
woven hornet
#

oh alright ok thx

#
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
    int n;
    int x;
    scanf("%i %i", &n, &x);
    printf("%i %i", n, x);
    int a[n];
    for (int i = 0; i < n; i++)
    {
        scanf("%i", a[i]);
    }
    for (int i = 0; i < n; i++)
    {
        printf("%i", a[i]);
    }
    
}
#

for the first line, i wanted to get 2 inputs (n, x)
where n is the number of elements in an array

and second line, i wanted to get n number of integers

#

so for eg.
5 2
1 4 6 2 9

#

so i tried to create a loop for scanf,

int a[n];
for (int i = 0; i < n; i++)
{
  scanf("%i", a[i]);
}```
#

but it doesnt work

odd sphinx
#

arrays like that can only have constant length

#

n isnt constant here

#

u have to do int a[10] or something

#

what does that do

#

lol

#

bruh

unreal sigil
#

@cedar turtle The most used libraries in Javascript, is pretty much two lines of code, which checks if a number is even. And the second most used library, imports that library and just does !isEven(number) to check if it's odd. And I hate everything about that.

#

Or the other way around, I don't recall

cedar turtle
unreal sigil
#

but uh, 250k+ downloads of isEven per week

#

what on earth

#

happened there

cedar turtle
unreal sigil
#

How did this come about

cedar turtle
#

are js devs ok?

#

do they need help

unreal sigil
#

react does appear to be slightly popular

cedar turtle
#

WHY 250K+ FOR ISEVEN?

cedar turtle
#

i can't even comprehend it

dusky cliff
#

why use x % 2 == 0if you can do npm install isEven 🧠

unreal sigil
cedar turtle
#

is npm so good that installing that package is easier than writing 2 lines of code?

sinful sun
#

laughs in node_modules

dusky cliff
#

thicc boi

cedar turtle
unreal sigil
dusky cliff
#

lol

odd sphinx
unreal sigil
#

another good article

odd sphinx
unreal sigil
odd sphinx
#

isEven has a dependency lfmao

dusky cliff
#

lmao

odd sphinx
#

isOdd is made by the same guy

dusky cliff
#

its actually smart
if the definitions of odd and even ever change, you only need to change the code in one place

#

🧠

odd sphinx
#

trueeeee

shrewd lance
#

number % 2 and !(number % 2) >.>

median blade
#

yeh

sinful sun
#

its more than 2 lines tbf

#

its 16

median blade
#

lmao

sinful sun
#

oi bot why arent you highlighting the lines

#

Used by: 845k
Oh to be a JS dev

odd sphinx
#

so true

median blade
#

845k 😐

jovial island
upbeat sandal
#

When I worked at a coffee shop, people often said that they only drink iced coffee because hot coffee is too hot. And what I don't understand is why they were drinking it when it was too hot to drink

odd sphinx
#

lmao

#

well it is good when its warm

#

just not boiling hot

upbeat sandal
#

I think a lot of places intentionally hold the coffee at undrinkable temperatures. Perhaps because they anticipate that people will drown it with milk

dusky cliff
#

mcdonalds coffee lady flashbacks

upbeat sandal
#

their first cup would never cool down in time for them to drink it with the food they ordered, so they'd just leave

undone root
sweet meteor
#

lmfao

odd sphinx
#

yes

median blade
#

by indian standards at least heh

odd sphinx
#

lol

#

chai moment

upbeat sandal
#

why would you drink chai when coffee exists?

upbeat sandal
median blade
#

heh yes

#

we like it hot

#

most of us

median blade
dusky cliff
#

coffee > tea

vapid atlas
vague shadow
#

As it should be

vapid atlas
#

nyet

#

!quiz general

#

.quiz general

rustic harborBOT
#
Quiz game starting!

This game consists of 7 questions.
**Rules: **No cheating and have fun!
Category: general

#
Question #1

How many planets are there in the Solar system?

vapid atlas
#

8

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 100 points!

#
You got it! The correct answer is **`8`**

Information
In the Solar system, there are 8 planets: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus and Neptune. Pluto isn't considered a planet in the Solar System anymore.

Let's move to the next question.
Remaining questions: 6

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 100

#
Question #2

Which country is the largest producer of coffee?

vapid atlas
#

brazil

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 100 points!

#
You got it! The correct answer is **`Brazil`**

Information
Brazil is the world's largest coffee producer. In 2016, Brazil produced a staggering 2,595,000 metric tons of coffee beans. It is not a new development, as Brazil has been the highest global producer of coffee beans for over 150 years.

Let's move to the next question.
Remaining questions: 5

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 200

#
Question #3

What is the largest ocean in the world?

vapid atlas
#

pacific ocean

#

pacific

rustic harborBOT
#

20s left!

#

10s left!

vapid atlas
#

Pacific Ocean

#

Pacific

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 50 points!

#
You got it! The correct answer is **`Pacific`**

Information
The Pacific Ocean is the largest and deepest of the world ocean basins. Covering approximately 63 million square miles and containing more than half of the free water on Earth, the Pacific is by far the largest of the world's ocean basins.

Let's move to the next question.
Remaining questions: 4

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 250

#
Question #4

What does the acronym GPRS stand for?

#

20s left!

vapid atlas
#

general packet radio service

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 75 points!

#
You got it! The correct answer is **`General Packet Radio Service`**

Information
General Packet Radio Service (GPRS) is a packet-based mobile data service on the global system for mobile communications (GSM) of 3G and 2G cellular communication systems. It is a non-voice, high-speed and useful packet-switching technology intended for GSM networks.

Let's move to the next question.
Remaining questions: 3

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 325

#
Question #5

In what country is the Ebro river located?

#

20s left!

vapid atlas
#

spain

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 75 points!

#
You got it! The correct answer is **`Spain`**

Information
The Ebro river is located in Spain. It is 930 kilometers long and it's the second longest river that ends on the Mediterranean Sea.

Let's move to the next question.
Remaining questions: 2

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 400

#
Question #6

Which country is known as the "Land of Thunderbolt"?

vapid atlas
#

bhutan

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 100 points!

#
You got it! The correct answer is **`Bhutan`**

Information
Bhutan is known as the "Land of Thunder Dragon" or "Land of Thunderbolt" due to the violent and large thunderstorms that whip down through the valleys from the Himalayas. The dragon reference was due to people thinking the sparkling light of thunderbolts was the red fire of a dragon.

Let's move to the next question.
Remaining questions: 1

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 500

#
Question #7

Which is the largest hot desert in the world?

vapid atlas
#

sahara

rustic harborBOT
#

@vapid atlas got the correct answer :tada: 100 points!

#
You got it! The correct answer is **`Sahara`**

Information
The Sahara Desert covers 3.6 million square miles. It is almost the same size as the United States or China. There are sand dunes in the Sahara as tall as 590 feet.

Remaining questions: 0

#
Score Board

QuackerUltimate ᓚᘏᗢ#0934: 600

#

The round has ended.

#

Congratulations @vapid atlas :tada: You have won this quiz game with a grand total of 600 points!

vapid atlas
#

@jovial island

median blade
#

is good

#

hah

dusky cliff
#

wrong

median blade
#

i mean there is green tea

#

but yeah

#

tea

#

wins

#

hah

dusky cliff
#

no

median blade
#

shh

vapid atlas
#

tea is generally sweeter than coffee

median blade
#

that is if you put sugar

vapid atlas
#

so it depends on whether you like sweet or sour

median blade
#

hah

#

no

tranquil ridge
#

tea

dusky cliff
#

is bad

tranquil ridge
#

no

median blade
#

good

vapid atlas
#

what is this conversation

dusky cliff
#

coffee > tea

tranquil ridge
#

tea > coffee

dusky cliff
#

no

tranquil ridge
#

yes

dusky cliff
#

you're too young to have opinions

tranquil ridge
#

and so are you

dusky cliff
#

no

tranquil ridge
#

yes

dusky cliff
#

no

median blade
dusky cliff
#

vinam is 14

#

when i was your age i was 15 😤

median blade
#

wat

#

my brain

tranquil ridge
dusky cliff
#

to conclude this discussion, coffee > tea.

median blade
#

no

#

none

#

is good

dusky cliff
#

wrong again

median blade
#

honey + water

dusky cliff
#

tf

vapid atlas
#

how about coffee = tea

median blade
#

no

#

go away

dusky cliff
#

absolutely not

vapid atlas
#

how about coffee>tea>coffee

median blade
#

no

#

water best

dusky cliff
#

:loading_cat:

median blade
#

heh no nitro

#

RIP

dusky cliff
median blade
vapid atlas
#

cats are delcious

median blade
#

tf is that emoji

#

F

#

yes eat cats

dusky cliff
#

its a handshake

#

smh

median blade
#

my emoji

#

just randomly put

vapid atlas
#

:troll:

median blade
#

ah yes, how to ruin your stomach

tranquil ridge
#

orange juice

tranquil ridge
median blade
#

wheee

#

orange juice more like shit

#

water is da best

jovial island
vapid atlas
median blade
#

that's fine

odd sphinx
#

i just read

#

that coffee > tea

#

and while that is true

#

water > coffee

dusky cliff
#

acceptable

echo flower
odd sphinx
#

absolutely

jovial island
#

@dusky cliff there?

dusky cliff
#

ye

jovial island
#
def get_all_possible_selections(N):
  final_set = set()
  a = list(range(N))
  for i in range(1, N+1):
    for j in combinations(a, r=i):
      # print(list(j))
      print(list(j), len(j))
      if len(j) == 1:
        final_set.add(lambda A: A[j[0]])
      else:
        final_set.add(lambda A: A[list(j)])
  return final_set
D = [i(np.array([5,6,7])) for i in get_all_possible_selections(3)]
D

o/p

[0] 1
[1] 1
[2] 1
[0, 1] 2
[0, 2] 2
[1, 2] 2
[0, 1, 2] 3
[5,
 5,
 5,
 array([5, 6, 7]),
 array([5, 6, 7]),
 array([5, 6, 7]),
 array([5, 6, 7])]
#

i wonder what is wrong in this

#

while same static version is working

def zzz():
  c = [
       lambda Z: Z[0,],
       lambda Z: Z[1],
       lambda Z: Z[2],
       lambda Z: Z[[0, 1]],
       lambda Z: Z[[0,2]],
       lambda Z: Z[[1,2]],
       lambda Z: Z[[0,1,2]],
  ]
  return c
[i(np.array([5,6,7])) for i in zzz()]
=> [5, 6, 7, array([5, 6]), array([5, 7]), array([6, 7]), array([5, 6, 7])]
dusky cliff
#

🤔

jovial island
#

i even tried to print j to make sure.

#
      if len(j) == 1:
        final_set.add(lambda A: A[j[0]])
      else:
        final_set.add(lambda A: A[list(j)])

i feel thats where im doing something wrong but can't figure out what

wide totem
#

Was a tough read

dusky cliff
#

wait

#

I think this has something to do with how lambdas are scoped

jovial island
#

oh so it is taking last value of j?

dusky cliff
#

I think so

jovial island
#

alright, how can we add functions?

#

can we kinda store like const a = () => ...

dusky cliff
#
In [10]: def func():
    ...:     a = 5
    ...:     y = lambda: a
    ...:     a = 6
    ...:     return y
    ...:

In [11]: func()()
Out[11]: 6
jovial island
#

ah

dusky cliff
#

maybe you can try returning slice objects instead of a function that slices

jovial island
#

no returning function is what is important

#

on top of this i need to do function composition in next part

dusky cliff
#

I think this issue could be solved with a generator yielding lambas instead of returning a single set at the end

jovial island
#

i don't think it will work

odd sphinx
jovial island
#

but can't i like add function like js?

dusky cliff
#
In [21]: def get_all_possible_selections(N):
    ...:   a = list(range(N))
    ...:   for i in range(1, N+1):
    ...:     for j in combinations(a, r=i):
    ...:      yield lambda A: A[list(j)]

In [23]: for i in get_all_possible_selections(3):
    ...:     print(i(np.array([5,6,7])))
    ...:
[5]
[6]
[7]
[5 6]
[5 7]
[6 7]
[5 6 7]
jovial island
#

umm

#

so again why does this work?

odd sphinx
#

wait

#

what happened with ur previous version

jovial island
#

my?

#

it kinda returns last value

#

wait hahastinkypoop lemme explain why this works

dusky cliff
#

when it yields lambdas it has to use the current value of j for the calculation

jovial island
#

correct me if im wrong

dusky cliff
#

too late

#

lol

jovial island
#

so we have not created the function for next iteration so it cannot consider the next one, while for next, we have already returned array so we're safe for mutation of last one

dusky cliff
#

yeah

#

but
wait
why are we generating all indices

#

i think we can use itertools.combinations on the numpy arr directly

jovial island
#

but we are doing it on combinations

dusky cliff
#

nvm you said you had to return functions

#

i forgot

jovial island
#

may be we can make np thingy for upper loop.

jovial island
dusky cliff
#

wdym add function

jovial island
#

okay lemme show kinda js version

#
const get_all_possible_selections = (N) => {
  final_set = []
  a = list(range(N)) // lets forget HOW TO in js for this
  for(let i = 1; i++; i<N+1){
    combinations(a, r=i).forEach(j => {
        const something = (A) => A[j]
        final_set.push(something)
  })
  return final_set
}
D = [i(np.array([5,6,7])) for i in get_all_possible_selections(3)]
D
#

this will work in js as we create a new function everytime

dusky cliff
#

oh wait

#

i think i found how to fix the lambda's scope

#

brb

jovial island
#

i tried this but didnt work

def get_all_possible_selections(N):
  final_set = set()
  a = list(range(N))
  for i in range(1, N+1):
    for j in combinations(a, r=i):
      if len(j) == 1:
        def something(A):
          return A[j[0]]
        n = something
        final_set.add(n)
      else:
        final_set.add(lambda A: A[list(j)])
  return final_set
D = [i(np.array([5,6,7])) for i in get_all_possible_selections(3)]
D
dusky cliff
#
In [33]: def factory(j):
    ...:     return lambda A: A[list(j)]
    ...: def get_all_possible_selections(N):
    ...:   final_set = set()
    ...:   a = list(range(N))
    ...:   for i in range(1, N+1):
    ...:     for j in combinations(a, r=i):
    ...:      final_set.add(factory(j))
    ...:   return final_set
    ...:

In [34]: [i(np.array([5,6,7])) for i in get_all_possible_selections(3)]
Out[34]:
[array([7]),
 array([5]),
 array([6, 7]),
 array([5, 7]),
 array([5, 6]),
 array([5, 6, 7]),
 array([6])]
#

lesgo

jovial island
#

lemme digest

#

the scoping in python is weird dude.

dusky cliff
#

yeah lol

jovial island
#

so lemme ask a very weird way

#

if i define lets say by some way create a unique named function in above version it will work right?

dusky cliff
#

you mean using a def func() instead of a lambda?

#

it would have the same problem i think

jovial island
#

yes and lets assume function name is unique everytime

dusky cliff
#

oh god that sounds terrifying

jovial island
#

i know

dusky cliff
#

i don't think the function name will affect the scope of its vars though

jovial island
#

yes i know, but im thinking of yes it would work. terrible way but by the way how things in py work it will.

#

so shit is in thej?

dusky cliff
#

yeah, in my soln i create another function where j remains fixed for each lambda

jovial island
#

wait why?

#

what you mean? you just added a wrapper

dusky cliff
#

yes

#

in that wrapper the j doesn't change in a call

jovial island
#

why does it not change? j is a list right?

#

tuple

dusky cliff
#

yes

#

aa this is weird to explain

#

one sec

#

so the lambda's scope works by looking up the environment it is created in
if you create the lambda in get_all_possible_selections, the environment for the lambda is get_all_possible_selections, andthe j changes in the next iteration, so the j used in the lambda changes

if you create the lambda in factory, the environment is factory, and inside factory j never changes, it remains the list that it was called with. in the next iteration of get_all_possible, there will be another call to factory but this is a separate environment, so the next lambda is independent of the current one and the current one is independent of changes happening in the next one

jovial island
#

ah i see.

#

alright that makes very clear sense.

#

so @dusky cliff I was near in my version

def get_all_possible_selections(N):
  final_set = set()
  a = list(range(N))
  for i in range(1, N+1):
    for j in combinations(a, r=i):
      def something(j):
        return lambda A: A[list(j)]
      n = something(j)
      final_set.add(n)
  return final_set
D = [i(np.array([5,6,7])) for i in get_all_possible_selections(3)]
D
#

but mine creates new function everytime while once is enough(your version)

dusky cliff
#

your version works too

#

scopes are pretty weird yeah

jovial island
#

yeah it works but at the same time, im creating the same function again and again

#

thanks a lot @dusky cliff you've been a real real help ❤️

odd sphinx
#

np

vagrant pine
#

Actual headache generator

upbeat sandal
#

what do I do if I want coffee but I need to sleep eventually

odd sphinx
#

drink coffee flavoured uncaffeinated water

jovial island
#

pretend to drink coffee or pretend to sleep

vapid atlas
upbeat sandal
#

Unfortunately, because of selective breeding, there isn't very much genetic diversity among coffee crops worldwide

#

so a disease that can affect one crop is likely to affect most crops worldwide

#

there's talk of mixing existing crops with wild varieties, but it might not taste as good

real forum
upbeat sandal
#

@real forum I'm not genetically superior

real forum
#

Just become genetically superior

#

It's ez

#

Just go fuck with your DNA

upbeat sandal
real forum
sinful sun
#

one way to find out

real forum
#

You might get like heart problems in your dna tho!

sinful sun
#

remember the limit is 52 cups

vague steeple
#

then just administer one drop under the tongue

#

then bam! You are now coffeeman

upbeat sandal
daring jay
#

Common joe, stop slowing down the infraction queries 😔

pastel nest
#

radioactive coffee and coffee injection to dna-
welp, daily dose of ot for ya

upbeat sandal
median blade
#

ok

median blade
hazy laurel
#

common joe lol

dusky cliff
#

a Common Joe in its natural habitat

cedar turtle
#

did you photoshop it or did you have that picture in your folders?

#

tell me right now

#

this is an investigation

dusky cliff
#

5 minute ms paint job

odd sphinx
wide totem
#

rust

#

damnit where is aboo

odd sphinx
#

no

wide totem
#

@unreal sigil have you gotten to chap 5.1 yet?

unreal sigil
#

nope

wide totem
#

ah

#

its structs

#

I think they're like python dataclasses

unreal sigil
#

I'll finish chapter 4 later today when I get time

wide totem
#

ah

#

i decided to kinda just read chap 4 but go to chap 5 and try to make a simple program at this point

#

so uh, could say I haven't finished chap 4

unreal sigil
#

I might have actually finished 4 already, can't remember

wide totem
#

4 had the slice types

#

stuff like str[1..3]

unreal sigil
#

Wasn't 4 memory management?

#

Oh it has slice as well

unreal sigil
#

Yeah that ties into Rusts memory management

wide totem
#

ah

#

yeah

#

references

#

and ownership

wide totem
unreal sigil
#

Slices don't have ownership, it goes on to discuss a few more things regarding rusts memory management while talking about slices

wide totem
#

ah

#

ty

odd sphinx
#

bye mate

dusky cliff
#

wow nice spamming sussy

odd sphinx
#

bruh

median blade
#

lmao

pulsar escarp
#

joe mammas name so fat it take O(tan(n)) time

odd sphinx
#

what if n is pi/2

dusky cliff
#

joe mama so fat she larger than tan(pi/2)

odd sphinx
#

lol

pulsar escarp
#

joe mamma so fat the number of digits in her weight increase faster than speed of light

tranquil ridge
median blade
whole condor
wide totem
#

@grim seal really joe? You're in the microsoft winget reg

dusky cliff
#

lol

wide totem
hazy laurel
#

o_o

cerulean panther
#

lol

hazy laurel
#

version 4.6 o_o

#

okay but why are you just... "winget show joe"ing

#

why've you got an obsession with Joe D:

wide totem
#

To see what they had

hazy laurel
#

jeez

#

lol

median blade
#

yo @hazy laurel

hazy laurel
#

um

median blade
#

what do i do

hazy laurel
#

did you install the dependencies

median blade
#

ah

#

i forgot

#

heh

hazy laurel
#

lol

median blade
#

what are the deps

#

where can i find em

hazy laurel
#

pyenv installation section

#

one second

#

prerequisites

median blade
#

thanc

tiny parrot
hazy laurel
#

pls

#

FiraCode

cerulean panther
hardy prairie
#

and use it

tiny parrot
#

i'll do it

median blade
#

comic sans is not bad

tiny parrot
#

not bad in general
just bad for coding

sinful sun
#

its not monospaced hence its bad

#

find a monospaced comic sans

plucky shale
#

If i have list like [1, 1, 1, 2, 2, 3] and try to count how many 1s are in that list and then how many 2s are in that list and so on, what’s that called?

dusky cliff
#

!d collections.Counter

clever salmonBOT
#

class collections.Counter([iterable-or-mapping])```
A [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") is a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "dict") subclass for counting hashable objects. It is a collection where elements are stored as dictionary keys and their counts are stored as dictionary values. Counts are allowed to be any integer value including zero or negative counts. The [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") class is similar to bags or multisets in other languages.

Elements are counted from an *iterable* or initialized from another *mapping* (or counter):

```py
>>> c = Counter()                           # a new, empty counter
>>> c = Counter('gallahad')                 # a new counter from an iterable
>>> c = Counter({'red': 4, 'blue': 2})      # a new counter from a mapping
>>> c = Counter(cats=4, dogs=8)             # a new counter from keyword args
dusky cliff
#

hmph

#

doesn't show the common use

#

!e

import collections
a = [1, 1, 1, 2, 2, 3]
print(collections.Counter(a))
clever salmonBOT
#

@dusky cliff :white_check_mark: Your eval job has completed with return code 0.

Counter({1: 3, 2: 2, 3: 1})
hazy laurel
#

Is there such a thing for hot reloading Flask/apache2

#

so when I deploy I don't have to manually do "systemctl reload apache2"

tribal tinsel
#

@flat hinge

oh dumb me so x is a place holder for sh or h or th
it's probably how they were made, yes - they're old and they were originally meant as a general gender neutral pronoun.
there's a lot of pronouns that end with -e or -ey to imitate the standard pronouns.

wide totem
#

Aaaaaaa

#

I just learned that winget released

quiet depot
#

👀

gilded herald
#

the channel name ;-;

hoary basalt
#

lol

hazy laurel
#

idek what it means

#

prescriptivism nevermind

gilded herald
#

public static void main

hoary basalt
#

string args

hazy laurel
#

ope

dusky cliff
#

System.out.println

median blade
#

what is monospaced

#

like what's the difference

dusky cliff
#

all characters are of the same width

clever salmonBOT
#
No way, José.

Sorry, you can't do that here!

dusky cliff
#

so
wwwwww
iiiiii
would be of the same width

median blade
#

oh

#

i see

#

thanks

odd sphinx
#

nvm

dim root
#

need some help with c, anyone here?

dusky cliff
#

perhaps

rigid echo
#

Ok

dim root
rigid echo
#

You learning c ?

dim root
#

But I get this error, dunno where I went wrong sadge

urban viper
dim root
#

Oh gosh I am so stupid

urban viper
#

errors like these are the worst, you just never look in places like that

dim root
#

yeah

#

it ends now PE_PandaThink

urban viper
#

well, the while loop goes while (won == -1) but it's set to 0

dusky cliff
dim root
#

nvim 🙃

dusky cliff
#

😩

urban viper
#

i guess that is what i get for using notepad++

dusky cliff
#

👀

dim root
#

oh notepad fan, never used it

urban viper
#

oh no, even the default C/C++ VSC extension and gcc -Wall stay silent

dusky cliff
#

jetbrains moment

odd sphinx
#

no

dusky cliff
#

ok

urban viper
#

for java it sorta hints by complaining about unreachable code

#

i tried out pycharm once, apparently i'm not the best at following PEP8 so my entire screen was effectively ⬇️

odd sphinx
#

lmao

#

same

dim root
#

ok after a few more silly erros, I get stuck here

dusky cliff
#

and let it do what it wants on its own

#

works for me

dim root
#

or disable it PE_PandaDevil

dusky cliff
dim root
#

Looks like my check winner logic is messed up

#

its the first statement pithink

jovial island
dim root
#

yeah

jovial island
#

also wait what happened to 0?

dim root
#

0?

#

oops yes

jovial island
#

why not started from 0 lol

#
def isWon(board):
    for i in range(3):
        # check if we're winning in nth row
        if board[i][0] != 0 and board[i][0] == board[i][1] == board[i][2]:
            return board[i][0]
        # check if we're winning in nth column
        if board[0][i] != 0 and board[0][i] == board[1][i] == board[2][i]:
            return board[0][i]
    if board[0][0] != 0 and board[0][0] == board[1][1] == board[2][2]:
        return board[0][0]
    if board[2][0] != 0 and board[2][0] == board[1][1] == board[0][2]:
        return board[2][0]
    return 0

thats my py version but im pretty sure i can do it with 1d too and c

dim root
#

Yeah, first i was using 0, 1, 2, 3, ... and the places would be starting from 1, and then I changed it

#

and forgot

jovial island
#
for(int i=0;i<9;i+=3){
  if(board[i] == board[i+1] && board[i] == board[i+2]) {
    // same row
  }
}

for(int i=0;i<3;i++){
  if(board[i] == board[i+3] && board[i] == board[i+6]) {
    // same col
  }
}
#

this would probably work for row and col(i haven't checked tho)(starting from 0 version)

jovial island
#
for(int i=0;i<3;i++){
  if(board[i*3] == board[i*3+1] && board[i*3] == board[i*3+2]) {
    // same row
  }
  if(board[i] == board[i+3] && board[i] == board[i+6]) {
    // same col
  }
}

single loop version

timber field
#

why

vague shadow
#

it's asking you to select more than one answer

#

the first one shows div in green, meaning that one is right, you just didn't select all of the right ones

timber field
#

oh i forgot

median blade
#

lol

woven hornet
#

if i want to print 30%

int main(void)
{
  int x = 30;
  printf("%i", x);
  printf("%s", "%");
}```
#

can i ask why the % here is considered a %s

#

and not %c

odd sphinx
#

"%" is a string

#

also to display a %

#

u use %%

#

iirc

woven hornet
#

oh ya

odd sphinx
#

prashant

woven hornet
jovial island
odd sphinx
#

nothing

odd sphinx
jovial island
odd sphinx
#

o

#

ok

jovial island
#
    printf("%s", "%");
    printf("%c", '%');
    // both valid
woven hornet
#

need 2 %%

#

printf("%i%%", x)

jovial island
#

printf("%d%", 30); // 30%

jovial island
#

no wait

woven hornet
jovial island
#

yeah

#

zee right

woven hornet
#

👍

jovial island
odd sphinx
ancient whale
#

does anyone happen to know how modern chess apps are done? I started going down the rabbit hole that is bitboards but im struggling to find much without just copying a tutorial

short cliff
#

That's sometimes the best thing to try

#

Start with something existing and then start from scratch after learning what you've learned

ancient whale
#

true but I also wouldn't mind learning the theory and trying to grind through it first

short cliff
#

That's fair

ancient whale
#

maybe, I might end up asking in the c server too

short cliff
#

Also a fair option

sinful sun
#

Pick an engine and build a frontend for it basically

#

Multiplayer is gonna be more complicated with sockets and shit

ancient whale
#
  • it'd probably look good on a resume if I can figure it out properly
sinful sun
#

I would first start with a frontend for a singleplayer app using stockfish probably

#

And then you can do multiplayer modes, use different engines, etc

ancient whale
#

I want to figure out the backend first before working on frontend/gui but I might just do that if I give up
if it was a project for a client/for fun it'd do it but I want to figure out how the more technical/lower level stuff works and see if I can manage it

#

after that, creating generalized hooks for engines should be fairly self explanatory

#

I might see if I can get in contact with any of the devs from chess.com/lichess too, that might help a bit

rigid echo
#

@somber belfry I saw you in the stage channel 👀

#

few min ago

somber belfry
#

👍

rigid echo
#

joe was there too?

#

right?

grim seal
rigid echo
#

you typing

#

meh

#

you see every message sppoky owner 👀

dim root
#

stage chanel? we don't have any on this server

#

oh saw it is just now

#

Q and A

sturdy niche
#

So 2 laptops... 6hdd replacements... 1 aux... 50 mails... 2 lawyers... 2 service centers ... and all the acer technicians later... I've been scammed of 60000 rupees by an mnc

#

@foggy cape

#

Summary

odd sphinx
#

damn

sturdy niche
#

Of the story

wheat aurora
#

Soon ™️

rigid echo
#

mhm

tribal tinsel
#

Birdo still hangs around ❤️

tribal tinsel
#

Cattos are home so they won't get the birdie

tranquil ridge
tribal tinsel
#

Because cats are frustrated they don't get the birdo so they eat more?

  • cats are liquid and it's hot, so they melt
dusky cliff
#

sounds legit

tribal tinsel
#

My first though was "looks dead" tbh XD

#

Moved to a box a bit later, when acting dead in front of doors didn't give him pass to go outside

short cliff
#

Alright, I'm confused about something

#

I was messing around with JavaScript and specifically arrays and .sort(), and there's something that isn't making sense:
https://paste.pythondiscord.com/epayagupiv.js

Why would lines 11 and 12 happen? Would it not just check it only once?

wide totem
#

Hello hem

short cliff
#

This has been driving me crazy for the past couple days

jovial island
short cliff
#

So something I found

#

It seems to be exclusive to V8

#

As I can only replicate it on Chromium based

dusky cliff
#

does js use timsort too?

short cliff
#

Tim or Quick depending

#

Not sure

jovial island
#

iirc its timsort.

short cliff
#

Hold on

#

Oh no wait, nevermind

jovial island
short cliff
#

I did paste the code, derp

#

I've replicated it with two number sets thus far

jovial island
#

works twice with 105 too

short cliff
#

let test = [1, 5, 2, 3, 59, 123, 1, 4]; ends up with the same issues, but with 2 - 5 = -3

#

So it has something to do with the second and third element

#

At this point I'm probably just going to make an SO question about it

short cliff
#

He looks so happy

hazy laurel
#

Why does that snake look so happy lmfao

short cliff
#

He probably just got the joke

hazy laurel
#

you'd think he'd frown

short cliff
#

Can snakes frown?

hazy laurel
#

Can they really smile?

short cliff
#

Nah, just look stoked

somber belfry
#

Snakes can look pissed

hazy laurel
#

oh my

jovial island
#

yeah in FF its different so its v8 based.

#

this may help @short cliff if i get a precise reason i'll let you know

short cliff
#

Perfect! I really appreciate you tracking that down for me

jovial island
#

FF

wide totem
short cliff
#

Har dee har

odd sphinx
#

lol

#

funny programmer joke

wide totem
#

i've never used either, but heard that ts is better

short cliff
#

I have, but I haven't in a long time so I'm brushing up on JS vanilla first

wide totem
#

ah

#

is JS a req of using TS?

#

or recommended req

short cliff
#

Recommended

#

At least to me

wide totem
#

ah

jovial island
wide totem
short cliff
#

Windows (and it's what I use for work, which is where I do most of my hobby coding since I don't do it professionally)

#

But I'm comfortable with Windows anyway

odd sphinx
#

same

short cliff
jovial island
#

https://davidlowryduda.com/extra-comparisons-in-pythons-timsort/

this may be the case. ima check this algo in details tomorrow but yeah guess is it's more about timsort altho the question still remains if spidermonkey uses timesort too.

#

.bm 854432162379464704

wide totem
#

Rust

languid osprey
#

Hi

wide totem
#

@languid osprey hello

languid osprey
#

Hi

wide totem
#

Hello

wheat rock
#

sleep

shrewd crag
#

Hello

cerulean panther
shrewd crag
#

How's it going?

#

I'm making some Cheeseburger Mac but it's plant based. It's pretty decent.

cerulean panther
shrewd crag
#

Cool. Do you guys talk about random topics or is it pretty restricted to coding

median blade
#

random

shrewd crag
#

I'm having allergies because of plants procreating and whatnot so I took some Aleve D and now I'm all amped up.

dusky cliff
#

because of what now

shrewd crag
#

whispers: plant coitus

cerulean panther
shrewd crag
#

yes

#

exactly

#

do coders sleep?

quiet depot
#

no

#

if they sleep, who will keep the internet up?

rigid echo
#

😅

odd sphinx
#

lol

#

coders dont sleep

quiet depot
#

for programmers can sleep

dusky cliff
#

pro editing

#

no idea what it says in the white

median blade
#

blame tenor for shitty gifs

quiet depot
#

i have nitro now?

wide totem
#

Currently 1am and I've never slept in my life

shrewd crag
#

oh.

#

Cool

#

I started watching a show

#

i have a server

#

but you guys don't really chat much... or at least maybe not late at night? during work hours?

odd sphinx
#

there is no work hours

#

at least one person is online

#

just not in this channel

tranquil ridge
odd sphinx
#

lol

copper kernel
#

help me in bread help to get bread

#

🍞

real forum
#

Why do you keep saying that in every OT channel

unreal sigil
#

@copper kernel Please don't spam advertise your help channel

#

There's no need to advertise your help channel at all, especially in every single off topic channel

copper kernel
#

but how long will it take when someone will come to help

tribal tinsel
elfin vine
#

I want to type a tuple that has unlimited length, the first item is a string and all other ones are ints

#

Basically Tuple[str, int, int, int, int, int, int, etc.]

tranquil ridge
#

tuple length are fixed

jovial island
#

tuples are read only once created

elfin vine
#

What, no. I want a tuple (immutable, hashable)

#

But I don't know how long the tuple I will expect in my parameter is

limber pollen
#

You can probably implement your custom data type

#

Tuples of variable-length + static typing don't really go together

elfin vine
#

('a', 1, 2, 3, 4, 5, 6, 7) or ('c', 1, 2, 3) or ('a', 5, 6, 7)

dusky cliff
#

tuple[int, ...] would be any number of ints

#

not sure how you incorporate the first str there

elfin vine
#

I am not declaring the tuple, there I do know the length

elfin vine
jovial island
#

none of my business but i wonder why would you want that

cedar turtle
#

wait, you need unlimited length?

elfin vine
#

Yes, I do not know the length of the tuple that I am accepting as a parameter

jovial island
#

dynamic length may be a better phrase

cedar turtle
tranquil ridge
#

why not just do Tuple

dusky cliff
#

lol

cedar turtle
#

you can just add the string tuple and int tuple

dusky cliff
#

huh

cedar turtle
#
(string,) + (ints)
dusky cliff
#

i'm fairly you sure you can't just add type hints like that

cedar turtle
dusky cliff
#

yes

elfin vine
#

def accept_something(a: Tuple[?????]):
    ...


accept_something(('a', 1, 2, 3, 4, 5, 6, 7))
accept_something(('c', 1, 2, 3))
accept_something(('a', 5, 6, 7))
cedar turtle
#

bruh

elfin vine
#

That's what I've been saying from the start 😅

tranquil ridge
jovial island
#

I don't get why would you want mixed data structure? you're giving type hints so they are kinda typed. i mean. huh?

cedar turtle
#

in normal static languages you can't have arrays/lists/tuples/vectors with different types

tranquil ridge
#

rust moment

cedar turtle
tranquil ridge
#

tuples can have different types in it iirc

jovial island
cedar turtle
#

just make a custom class and type hint it

elfin vine
limber pollen
#

Tuples are not necessarily sequences in most languages

jovial island
cedar turtle
#

yeah

jovial island
#

instead of unpacking inside?

cedar turtle
#
class SpecificTuple(tuple):
   def __init__(self, string, ints):
      super().__init__((string,) + ints)

def my_func(arg: SpecificTuple):
      ...
``` would this work?
elfin vine
#

Yeah that seems to be what I'll have to do

#

Very true yeah

limber pollen
#

If you want that static typing:

from typing import Generic, TypeVar

_Head = TypeVar("_Head")
_Tail = TypeVar("_Tail")

class HeadTuple(Generic[_Head, _Tail]):
    def __init__(self, head: _Head, *tail: _Tail) -> None:
        self._head = head
        self._tail = tail
    ...

def accept_something(a: HeadTuple[str, int]) -> None:
    ...
#

I'm curious

elfin vine
#

Interesting, that's cool

odd sphinx
#

hits hard

clever parcel
#

like a golfball hitting your back?

#

because that is hard

odd sphinx
#

not quite as hard

clever parcel
#

nice

fluid haven
#

@urban jewel it would be fine here

urban jewel
#

thanks man

fluid haven
#

I'll close the previous one

urban jewel
#

my text is gone😳

#

but alright

fluid haven
#

Which text?

urban jewel
#

the question

#

it's fine i'll retype it

fluid haven
#

Ah, it's in the previous channel

urban jewel
#

thanks for the redirections

#

yeah

#

np

fluid haven
#

You can copy -> paste it

urban jewel
#

so anyone know how to in linux terminal ; i want to change the root account password, but after i get to the new password section i cannot type anything but hit the enter key

#

then it lets me go to retype password, then says error

#

because there isn't anything lol

#

how do i change it?

#

or what am i doing wrong that i cannot type it

urban jewel
fluid haven
#

idk what you are doing that makes you unable to type for the new password.

urban jewel
#

yeah

#

it's weird

fluid haven
#

What is the code rn?

urban jewel
#

i'm not home rn i'm at work, but before i left it was doing that.

#

it was all default

#

i can pull it up

#

but it was correct bc it gave me the new password option

#

it was like sudo root passwd

#

or something like that

#

but it just refused to input characters

fluid haven
#

I can't do anything without seeing

urban jewel
#

maybe they invisible for security?

#

yeah

#

my bad

fluid haven
#

sudo password root is the correct

urban jewel
#

i'll come back later. it just sucks bc i don't have coding mentor so it's overwhelming

urban jewel
fluid haven
#

I have to go to sleep atm

urban jewel
#

ok

#

thanks for help

fluid haven
#

Good luck next time.

gilded steeple
#

have question for naming, I have a database model named RolePacket that can have multiple PacketRole.
Problem is that it's very often the case that RolePacket has only one role (multiple roles is just a additional feature).
So since in most cases it will just be one role I'm thinking ´packet´ is kinda misleading. I'm thinking to rename it from ´packet´ to ´payload´ so it would be
as ´RolePayload´ and ´PayloadRole´ to make it more consistent. Is this a good idea?

#

not sure if average joe (no pun intended) would understand the term 'payload'

dim root
#

umm why is this happening, the imgs do exist there

urban jewel
#

there is a link to a text i need: and the directions say online:
'text' and put it in /home/pi/rpi-hdmi.sh.
[1:09 AM]
how do i "put it in" that location?

sudden swallow
fluid haven
#

That was last night

civic elbow
#

i actually consdier windows to be borderline malware in general. their recent update to win10 had jsut been more ways for them to scrape data from the users of their operating system. Here's a trick ... open the search function and type something in there ... notice that the first results that come up are those connected to an internet search . Which means everything searched in the search bar is getting passed to a browser .

quiet depot
#

i have a nitro?

dusky cliff
#

it's in the air

odd sphinx
#

yes

quiet depot
subtle wedge
#

@sturdy relic

sturdy relic
#

yes

#

ask away

subtle wedge
#

kk

#

prove that the accounting equation is satisfied in all the following transactions of a ltd
started business with cash 25000
purchased goods for cash 7000 and credit 3000
paid salary 400 and outstanding salary 100
sold goods for cash 10000 costing cash 6000
withdrew cash for personal use 7000

sturdy relic
#

and what is your question?

subtle wedge
#

thas my question

#

how do i do it?

#

or wut do i do?

sturdy relic
#

you need to take your current cash and see if it adds up with all of the transactions

#

do you want another example that shows you have the transaction would fail?

#

@subtle wedge ?

subtle wedge
#

so basicaly i need to add and subtract everything to see if i get profit or nthin?

sturdy relic
#

lets say you start out with 2000

#

and you want to buy goods for 2001 and sell them for 100_000

#

now you cant to that because you dont have 2001 in cash

#

you could on the other hand

#

buy goods for 2000 cash and 1 credit

#

sell it for 100_000

#

pay back 1 credit