#ot0-no-stealth-portals-please

3246 messages · Page 26 of 4

oak hemlock
#

oh, it was Manjaro

hearty prawn
#
int main(int argc, const char * argv[]) {

    int c;
    start();
    printf( "Enter a value : ");
    c = getchar( );
    doTask(c);
    return 0;
}
jagged obsidian
#

you need to format your code

hearty prawn
#

why the fuck does it print "tf" when i enter 1

cursive agate
#

at least fedora and opensuse does not do that. and Debian is my first distro btw xD

hearty prawn
#

@cursive agate you know C right?

oak hemlock
#

I'll respect those who use things like Ubuntu, openSUSE, or Fedora

jagged obsidian
oak hemlock
#

as desktop distributions, I mean

hearty prawn
oak hemlock
#

I find it a bit hard to get behind the idea of something like Debian as a desktop distro

jagged obsidian
#

you're better off using scanf("%i", c)

cursive agate
hearty prawn
#

i see

#

AHAHAHA

#

alright so

#
int main(int argc, const char * argv[]) {

    int c;
    start();
    printf( "Enter a value : ");
    scanf("%i", c);
    doTask(c);
    return 0;
}
``` `zsh: segmentation fault  ./kAWAI`
jagged obsidian
#

what the fuck

hearty prawn
#

xcode does yell at me

jagged obsidian
#

something null null

hearty prawn
#

Format specifies type 'int *' but the argument has type 'int

jagged obsidian
hearty prawn
#

question, why does that fix it?

jagged obsidian
#

it takes in a pointer

cursive agate
#

borrow

#

pointer

jagged obsidian
#

so like it can change it wr somehitng

hearty prawn
#

ah

cursive agate
#

dereferencing

#

god is evil

hearty prawn
#

it works niow

ocean walrus
#

& returns the pointer to its actual value, yes?

jagged obsidian
#

yes i thin kso

hearty prawn
#

alright so now i need to actually make the search feature

cursive agate
slate delta
#

&c returns the address of c

ocean walrus
#

Yes

cursive agate
#

yes

jagged obsidian
#

yes

slate delta
#

it is not itself a pointer though, is it

hearty prawn
#

alright so i need to now work with API's in C

#

is that possible

jagged obsidian
#

like, REST APIs?

oak hemlock
hearty prawn
#

no just a get request

jagged obsidian
#

ok so you need to find a http library

oak hemlock
#

*c would be a pointer, &c would be a reference

#

right? did I get that right

slate delta
#

actually no

jagged obsidian
#

*c is deref maybe?

slate delta
#

*c is a deference if c is a pointer

jagged obsidian
#

and what the hell are references

oak hemlock
#

I thought that was &

#

&*c should be valid

#

dereferencing a pointer of c

#

(This is why I stay away from C btw)

slate delta
#

*(&c) will work

oak hemlock
#

I'm pretty sure that it is

#

am I crazy

jagged obsidian
#

something something precedence

slate delta
#
test.c:6:26: error: indirection requires pointer operand ('int' invalid)
  printf("%p -> %i", p, &*i);
                         ^~
hearty prawn
#

im back

slate delta
#
#include <stdio.h>
int main() {
  int i = 100;
  int* p = &i;
  printf("%p -> %i", p, *&i);
  return 0;
}
0x7ffcba82fe88 -> 100
hearty prawn
#

I NEED TO WHAT

#

i need to use libraries?

jagged obsidian
#

Yes

#

unless if you want to have no deps, go use sockets directly

slate delta
#

libcurl :3

jagged obsidian
#

Yes libcurl yay

#

is good, but i wish there was something like cpr for c

hearty prawn
#

alright wait

#

what is the file name

jagged obsidian
#

what file name

hearty prawn
#

requests.h ?

#

the thing to import

#

libcurl

jagged obsidian
slate delta
hearty prawn
#

oki

static trout
#

i kind of find it funny that obama is a meme now

#

no idea why he is but i do wanna know

oak hemlock
#

just a thing that comes with being widely known

lofty cypress
#

What kind of meme is he

solid prawn
#

obamium

static trout
#

many kinds

solid prawn
#

obameme

hearty prawn
#

help

lofty cypress
#

No

hearty prawn
#

lmfao

#

i have ```c
char searchTerm;
printf(" Search : ");
scanf("%s", &searchTerm);
char command[500000];
strcpy( command, "brew search ");
strncat(command, &searchTerm, sizeof(&searchTerm));
printf(command);

#

if the name i'm searching for is bigger than 4 charecters is trace trap's

cedar imp
#

hey
could someone help me with a calculator

hearty prawn
#

sure go on

sick olive
cedar imp
sick olive
#

if you just post your problem here, you have better chances of getting help

#

maybe claim a help channel

hearty prawn
#

no

cedar imp
#

oh ok

slate delta
cedar imp
#

I used


def cube(x)
    return x * x * x
if choice == 6 :
    print(num1, "^", "3", "=", multiply(num1, num1, num1))

it worked with square but if you choose cube, it doesnt work

oak hemlock
#

you're missing a : after cube(x)

cedar imp
oak hemlock
pale mesa
#

why do u call multiply() when u have cube()

#

u can raise x to a power of 3 using x ** 3 if u want

oak hemlock
#

excuse me

#

nice nickname 😻

cedar imp
prime girder
#

hello

cedar imp
cedar imp
teal storm
sullen elm
#

You defined the function to take a single parameter, which is then cubed

#

So you'll just be passing it the single number to be cubed

oak hemlock
#

I mean really you're just writing a glorified pow

teal storm
# teal storm

@hearty prawn i can't remember if this is 100% up-to-date but this is roughly what the compilation process looks like

oak hemlock
#
def square(x):
    return pow(x, 2)

def cube(x):
    return pow(x, 3)
#

or x ** 2 and x ** 3

pale mesa
#

TIL pow exist

oak hemlock
#

lol

prime girder
#

you can also implement your own pow function

stone gyro
#

it doesn't have much use due to **

pale mesa
#

any speed difference?

stone gyro
#

except for pow's third argument, which is amazing and really weird to have in the prelude of a programming language

pale mesa
#

!d pow

obtuse swallowBOT
#
pow

pow(base, exp[, mod])```
Return *base* to the power *exp*; if *mod* is present, return *base* to the power *exp*, modulo *mod* (computed more efficiently than `pow(base, exp) % mod`). The two-argument form `pow(base, exp)` is equivalent to using the power operator: `base**exp`.
teal storm
stone gyro
#

modular exponentiation usually needs a library, yet here it is in Python

teal storm
#

actually maybe not

#

both have to perform a lookup

oak hemlock
#

I mean the only difference seems to be efficiency

dim flicker
#

I never knew pow existed

cedar imp
#

thank you all
it worked!

oak hemlock
#

(computed more efficiently than pow(base, exp) % mod)

solid prawn
#

you can calculate absurdly high powers if you are going to take mod

stone gyro
#

!e

print(pow(3123012312,312312312,1000))
solid prawn
#

like, pow(base, exp) might be impossible to calculate

obtuse swallowBOT
#

@stone gyro :white_check_mark: Your eval job has completed with return code 0.

56
stone gyro
#

But what's even more powerful

#

is that it supports negative powers

#

modular inversion

#

!e

print(pow(4,-1,7))
obtuse swallowBOT
#

@stone gyro :white_check_mark: Your eval job has completed with return code 0.

2
stone gyro
#

4*2 = 1 mod 7

#

I don't even know offhand how to calculate these tbh

solid prawn
#

wait

#

yeah how does this work with negative powers lol

cedar imp
#

is it possible to use pow so that the user can input the power

oak hemlock
#

1 % 7 is 8??

solid prawn
#

8 % 7 is 1

#

i.e. 8 is 1 mod 7

oak hemlock
#

wha

oak hemlock
solid prawn
#

often written as 8 ≡ 1 (mod 7)

prime girder
oak hemlock
#

My brain does not compute

solid prawn
#

im talking about the mod part

stone gyro
prime girder
#

Oh

stone gyro
#
/* Compute an inverse to a modulo n, or raise ValueError if a is not
   invertible modulo n. Assumes n is positive. The inverse returned
   is whatever falls out of the extended Euclidean algorithm: it may
   be either positive or negative, but will be smaller than n in
   absolute value.
   Pure Python equivalent for long_invmod:
        def invmod(a, n):
            b, c = 1, 0
            while n:
                q, r = divmod(a, n)
                a, b, c, n = n, c, b - q*c, r
            # at this point a is the gcd of the original inputs
            if a == 1:
                return b
            raise ValueError("Not invertible")
*/
#

apparently this is how it works

neat glen
solid prawn
#

it was better without the /* */ 😔

dim flicker
neat glen
#

!e print(4**(-1))

obtuse swallowBOT
#

@neat glen :white_check_mark: Your eval job has completed with return code 0.

0.25
neat glen
#

hmm

#

did i do something wrong, i expected it to be square root behavior

prime girder
#

huh?

#

x^n, where n < 0 is just 1 / x^n

solid prawn
#

square root would be 4 ** (1/2)

oak hemlock
neat glen
#

mb

dim flicker
#

You can't use | x |, you have to use abs in python right?

dim flicker
#

Ugh

oak hemlock
#

else it'd be an annoying situation trying to parse | x | y |

#

absolute x? x or y?

solid prawn
#

yeah

prime girder
#

to me that just looks like abs value of the bitwise OR operation's res

solid prawn
#

clearly the solution here is to remove bitwise operators from python

oak hemlock
#

lol

mortal hull
#

yeah, imagine using |x| for length 😳 and abs at the same time

dim flicker
#

Imagine using x for filler variables

mortal hull
#

cc @stone gyro 😳

hollow holly
dim flicker
#

... is where it's at

hollow holly
#

Yep

teal storm
#

closures r poggies

oak hemlock
#

I do remember liking the Rust closures

#

when they did what I expected them to, I mean

mortal hull
#

yeah, rust and swift get closures right

oak hemlock
#

some stuff was confusing, like async and move

#

and... move move?

#

something like that...

hollow holly
#

Are closures just anonymous functions but butter?

oak hemlock
#

I think it goes something like move | x move| {}

#

gosh, I can't remember anything

solid prawn
#

yeah closures get access to the variables in the surrounding scope

#
fn main() {
    let x = 1;
    let f = || {
        println!("{}", x);
    };
    fn g() {
        println!("{}", x)
    }
    f();
    g();
}
error[E0434]: can't capture dynamic environment in a fn item
 --> src/main.rs:7:24
  |
7 |         println!("{}", x)
  |                        ^
  |
  = help: use the `|| { ... }` closure form instead

For more information about this error, try `rustc --explain E0434`
oak hemlock
#

this is where you'd use move, no?

solid prawn
#

i have no idea what that does lemon_smug

oak hemlock
#

I think it gives ownership to the closure

#

so

let f = move || {
    println!("{}", x);
};
#

could be wrong about that

#

haven't used Rust in ages

mortal hull
#

yeah, closures borrow when possible, they don't implicitly move

solid prawn
#
fn main() {
    let x = 1;
    let f = || {
        println!("{}", x);
    };
    f();
}

this compiles and prints 1

#

ive forgotten what little of borrowing and ownership i'd learnt lemon_smug

oak hemlock
#

lol

solid prawn
#

cba to learn again

cedar imp
oak hemlock
#

wait... is that right

cedar imp
teal storm
cedar imp
teal storm
#

okay i pull up

teal storm
#

you can't get the cube root of a string

#

make no sens

cedar imp
oak hemlock
#

gosh, don't be shy.. put some more

cedar imp
#

like this?

#

thank you @oak hemlock @teal storm
the cube root is working

teal storm
#
using static System.Math;
using static System.Console;

var num = GetInput();
WriteLine($"Cube root of {num} is: {Pow(num, 1/3)}");

double GetInput()
{
    Write("Enter a number: ");

    while (!double.TryParse(ReadLine(), out var n))
        WriteLine("Not a valid number. Try Again.");

    return n;
}
cedar imp
#

just have to deal with this exponential

teal storm
#

😎

teal storm
cedar imp
teal storm
#

ah

cedar imp
sick olive
#

VSCode is actually a coffee machine.

#

VSCode is better than PyCharm

thick widget
static trout
sick olive
#

I don't know if the notification 1 symbol is actually a small punctuation mark meaning an error. Lmao

solid prawn
neat glen
sick olive
slate delta
dim flicker
faint condor
#

the c sharp discord servers suck ngl i much prefer the community in python

cedar imp
#

yall I did the exponential but I want to get rid of the second number question, the ways I've tried didnt work

hearty prawn
#

oh yeetskeet compile

#

is ```
"
"C
"B
"A
...
e

oak hemlock
hearty prawn
#

hey cy

oak hemlock
#

hi

hearty prawn
#

what up

#

guess what i just realised

cedar imp
hearty prawn
#

i didnt send my teacher my test

#

which was 2 weeks ago

#

im going to blame it on my partner and say that i though she sent it

oak hemlock
upper turret
#

bruh

cedar imp
#

yall the exponential is working well
I'm officially done with the calculator :sob: :sob:

oak hemlock
# cedar imp 8

Wow, I didn't know anyone actually uses Windows 8 anymore

thick widget
#

nnoiceee

oak hemlock
#

I've seen far more Windows 7 and XP users than Windows 8

thick widget
ocean walrus
#

"anymore"

oak hemlock
#

lol

#

I mean people used it when it was the newest

#

but literally like everyone jumped ship immediately

#

Windows 8 really wasn't a good look imo

ocean walrus
#

8.1 :P

oak hemlock
#

:faint:

cursive agate
#

my terminal is not even there smh

dusty aspen
#

What's your terminal?

sick olive
#

should i ping

teal storm
#

a program that prints ABC

sick olive
#

@magic jacinth why end stream
sorry for the ping it was thought very well tho

#

heart beat intensifies

magic jacinth
teal storm
#

@hearty prawn

  • source.ys : the source code for the program
  • cargo run -- -c source.ys : call the compiler with the arguments "-c source.ys" (compile the source code)
  • nasm -felf64 : assemble the assembly code that the compiler outputs
  • ld ... : link the assembled code against the complib (which contains the implementation for most of theYS instructions) and turn it into a executable file
  • ./main : run the outputted executable file
teal storm
teal storm
solid prawn
#

til about out

teal storm
solid prawn
#

yea i saw in the docs

zinc geode
#

Hey

hearty prawn
#

@teal storm mind if i dm you this seems intresting lmfao

hearty prawn
#

wow i feel so shitty, i just said "sheesh"

hearty prawn
#

awesome

sick olive
#

hello

static trout
#

https://www.youtube.com/watch?v=3FxfXVuHRjM
i thought i was in for a nice little story
i was wrong.

Perranporth Beach, in Cornwall, is famed for being the "Lego beach". The truth is more complicated. • Thanks to Tracey Williams! 📸 Lego Lost At Sea: https://instagram.com/legolostatsea or https://twitter.com/legolostatsea 📕 Her photo book ADRIFT: https://amzn.to/3a8glNW [aff. link]

Edited by Michelle Martin (@mrsmmartin)
Sound mix by Graham Hae...

▶ Play video
jolly hound
static trout
#

why do i feel this is skewed towards youtube

#

oh wait i just realized it's a youtube channel (as in the channel is owned by yt)

static trout
jolly hound
#

Probs lol

cursive agate
dusty aspen
#

okie

hearty prawn
#

AHHH

#

@dusty aspen you're smart i need help

dusty aspen
#

with what

hearty prawn
#

i need a tutorial to make a compiled programming language

#

i'm done with making interpreted ones

obtuse swallowBOT
hearty prawn
#

i can't find one and i'm dumb

dusty aspen
#

I just went with llvm's kaleidoscope and expanded on that

hearty prawn
#

send pls

dusty aspen
#

@ocean walrus might have something more specific

dusty aspen
hearty prawn
#

OMG C++

#

i love c++

#

the website is so ugly

dusty aspen
#

I've been following Crafting Interpreters for both tree-walk and bytecode, but those are still interpreters

hearty prawn
#

yeah

dusty aspen
#

it just explains what each step does

#

rather terribly, imo

hearty prawn
#

yeah it's more like a

#

"do this and good luck"

dusty aspen
#

it's a very high level theoretical overview, nothing specific

hearty prawn
#

hm

dusty aspen
#

But I suppose it is a medium blog, not a guide

hearty prawn
#

yeah

#

do you have any other sources?

#

i saved this

dusty aspen
#

No, I don't

#

I intend to mess with making compiled langs soon, but not yet

hearty prawn
#

h,

#

well i'll look into llvm more tommorow in school

#

thanks a bunch dawn, you are very wise

real rover
#

Happy Veterans day everyone

#

and Remembrance day

serene dagger
#

too busy being braver ¯\_(ツ)_/¯

pliant canyon
oak hemlock
#

I mean they're running the numbers and shit

pliant canyon
#

they are preparing for youtube rewind

oak hemlock
#

lmao

#

I mean they'll be departmentalized to the point where YouTube Rewind probably doesn't get much of a say

cursive agate
#

imma just move to odyssey

#

nvm i need youtube for some useful stuff like

#

anime ;)

tepid echo
#

bruh

pliant canyon
#

sure

ocean walrus
#

from scratch or with llvm?

oak hemlock
#

scratch :faint:

ocean walrus
#

Lmao

dusty aspen
#

snowy just asked about compiled language tutorials

ocean walrus
#

Hm

vast marlin
#

i registered, but wheres the actual conference happening

oak hemlock
#

what conference

slate delta
#

pyjamas

vast marlin
dusty aspen
oak hemlock
wild herald
#

what is the best free software i can use to make pixel art, mainly sprites and backdrops

slate delta
#

aseprite maybe? there's another one but i forget

clear root
vast marlin
#

its being streamed on youtube? why need tickets for that then maybe im being stupid and should watch the youtube video

wild herald
#

unless it is possible to compile it on macos

#

iv looked at it

slate delta
wild herald
#

thank you

clear root
#

@wild heraldit is on macports

#

so yes

#

but also, just doing it with cmake should work fine

wild herald
#

do you know how to comple it on macos?

ancient mural
#

They're saying it should be possible

clear root
#

it is kind of a pain

#

but if you follow the instructions correctly, it should work

wild herald
#

thank you, il try it

strong inlet
#

can someone explain tactile switches, like what they are, I can't find a good explanation on the internet

lofty cypress
#

its just the way they register signals from you pushing it down i believe

strong inlet
#

hm ok

lofty cypress
#

tbh i cant find a decent explanation either

#

or what other types of switches there are

strong inlet
#

isn't there like linear

sick olive
#

hello

#

anyone here?

pliant canyon
#

no

cursive wave
#

I love vscode logo_vscode

#

(yes, I feel better now)

teal storm
sick olive
#

Congrats @hollow holly 😁

teal storm
#

i can still see it

solid prawn
#

yeah i can see it too

hollow holly
#

Thanks! @sick olive @sick olive

keen island
#

They've been working on this source port for years

static trout
#

2 questions
what does terry prachett have to do with gnu
and why does it show i have 55 mods when i have like 5

#

and all of them are performance related dont modify the vanilla game

frozen narwhal
#

if in a site has an entire book but i cant dowload it, can i use python to dowload a pdf from ir ?

sick olive
#

gnus not unix and neither is terry pratchet

sinful frost
#

do you know good computer science servers ? to get help about computer science stuff

frozen narwhal
static trout
#

my piano isnt unix

#

wait maybe it is i dont know

#

its painful how slow wheat grows

sick olive
#

someone help 😔

static trout
#

sudo*

#

not sude

sick olive
#

oh

#

lmao sorry

#

read the error messages 💀

#

i did but i was too excited i didn't notice

#

ok

static trout
#

bruh

#

i went out to get some kelp

#

and a drowned was sniping me with a trident

#

in case you wanna know how dire the situation is
im on 1 hunger
and 4 hearts

#

i am addicted to mc ngl

meager blade
#

Oof

static trout
#

not good food but it'll help me not die

serene dagger
copper nimbus
#

overcrowed them to death

obtuse swallowBOT
pliant canyon
copper wigeon
#

isnt it hard doing uni and an internship at the same time
or do people dont have classes at all during internships

sick olive
#

depends on your iterest

sonic glacier
#

internships are often during the summer, some schools have a co-op placement built in to their curriculum

copper wigeon
#

im thinking of an internship in facebook

cedar imp
#

def add(x, y):
    return x + y
   
def subtract(x, y):
    return x - y
    
def multiply(x, y):
    return x * y
    
def divide(x, y):
    return x / y
    
def square(x):
    return x * x
    
def sqr(x):
    return x ** (1/2)
    
def cube(x):
    return x ** 3
    
def cuberoot(x):
    return x ** (1/3)
    
def pow(x, y):
    return x ** float(input("Input power: "))
    
print("""Select operation 
1. Add
2. Subtract
3. Multiply
4. Divide
5. Square
6. Square root
7. Cube
8. Cube root
9. Exponential""")

while True:
    choice = input("ENTER CHOICE (1-9): ")

    if choice in ('1', '2', '3', '4'):
        num1 = float(input("Enter the first number: "))
        num2 = float(input("Enter the second number: "))
        
    if choice == '1' :
        print(num1, "+", num2, "=", add(num1, num2))
        
    if choice == '2' :
        print(num1, "-", num2, "=", subtract(num1, num2))
        
    if choice == '3' :
        print(num1, "*", num2, "=", multiply(num1, num2))
        
    if choice == '4' :
        print(num1, "/", num2, "=", divide(num1, num2))
        
    if choice in ("9"):
        num1 = float(input("Enter your number: "))
    if choice == ('9') :
        print("The answer is", pow(num1, input))
        
    if choice in ("5", "6", "7", "8"):
        num1 = float(input("Enter your number: "))
        
    if choice == '5' :
        print(num1, "^", '2', "=", multiply(num1, num1))
        
    if choice == '6':
        print(num1, "^", "1/2", "=", sqr(num1))
        
    if choice == '7' :
        print(num1, "^", '3', "=", cube(num1))
        
    if choice == '8' :
        print(num1, "^", "(1/3)", "=", cuberoot(num1)) 

cedar imp
copper wigeon
#

im wondering if i can do an internship and uni at the same time

#

if there's like a break or low work in uni during the internship then its fine ig

sonic glacier
rough marsh
#

(i'm tempted to say trick question bc if you're in "uni" you're not american but these days i've started to say "uni" too)

frozen narwhal
#

How to start learning R? Start studying R has beeing much more difficult than starting python, it's not just like just to do it, the IDE, RStudios , is confusing and idk what i can do/ what i should do

sick olive
#

how come you wish to learn R? seems like python should do the trick for stats

#

I'm curious

clear root
#

I started with R just by doing things in repl and later figured out how to actually use the text editor in RStudio

sick olive
#

John Xinas Unite!!! @sick olive @visual narwhal @sick olive @peak moth @dry granite

frozen narwhal
sick olive
frozen narwhal
#

and is another language that differenciate me in the market

clear root
#

python is enough for the vast majority of stats

#

your time is probably better spent getting better at stats and data science than learning R

frozen narwhal
#

in python , you mean ?

clear root
#

if you already know python, sure

frozen narwhal
#

so i can do ANOVA tests, linear regression in python ?

#

etc

sick olive
#

yes

clear root
#

anova tests idk what they are, linear regression yes

#

yes

sick olive
#

why would you even think you can't

#

it's a general purpose language

frozen narwhal
#

its a table that show SQ

#

and pvalue

mortal hull
#

you can def do anova

#

be a bit sad if you couldn't

frozen narwhal
clear root
sick olive
#

it's also worth noting that python is de-facto tool for machine learning

#

and machine learning is nothing else but statistics on large data

clear root
#

if you want "not python" for statistics, I would suggest julia. It is a pretty damn nice language for this kinda stuff from what I hear, though it's not better than python yet.

lofty cypress
#

on the other hand if you want to be employable do R and maybe VBA

frozen narwhal
#

i'll try to pick on non-obrigatory class that has VBA

frozen narwhal
#

but it's better than R for analysis?

clear root
#

I am willing to bet that python, R and julia will be more than good enough for the vast majority of normal statistics

#

there is a point where a tool gets good enough that there is really no point of comparing them unless you have a very specific task

merry basalt
#

God I missed this place

frozen narwhal
#

i like the name of the chanell

merry basalt
#

Yeah it's pretty good

#

How have you been we haven't talked in a while

#

Like a long time

#

Didn't your name used to be the colour blue, but now it's white

#

I can't remember

#

I lost interest in all my hobbies and separated myself from public for a long time

#

Went to the hospital and got emitted into the mental ward, got diagnosed with schizoaffective bipolar disorder

#

I barely remember y'all but I have slight memories of conversations

frozen narwhal
#

how can i expand extensions ?

#

what is gg plot ?

limber scaffold
#

good evening gamers

ancient mural
#

🎮 hullo

ancient apex
#

Hi guys, I want to know what is the "trusted technical interview"?

sinful lark
#

someone know how to send video over a post request

#

mime type is video/*

sick olive
#

rockstar didn't do it, points for me i guess

oak hemlock
#

I decided to test out Arch to see if I could get my dGPU working properly

#

er... same problem as openSUSE and Ubuntu

#

in that my dGPU is performing the same or worse as my iGPU

deep heath
clear root
#

rip

sinful lark
#

whichever is easier to get going i guess

#

which would be python then

oak hemlock
#

I think this would work, but I'm unsure

deep heath
oak hemlock
#

just minus the content-type header

deep heath
#

it sends as files= not data=

deep heath
oak hemlock
deep heath
cursive agate
cursive agate
#

i will give u a config that makes it work. you ready?

oak hemlock
#

er sure

#

I have my doubts, though

prime girder
#

Hello yes who ping

onyx ice
#

Select the song and make sure shuffle is off. I'm assuming you have premium where you can choose your songs

neat sparrow
#

you probably don't have premium

#

buy spotify premium

lofty cypress
#

dont use shuffle

cursive agate
#

Linus trying out Linux in a nutshell

neat sparrow
#

lol

#

I thought linus of all people would have linux experience

ocean walrus
ocean walrus
#

I mean, PC enthusiast doesn't automatically make you familiar with linux

#

He's a gamer too, which windows is objectively the best OS for

lofty cypress
#

Why would he be a linux fan

#

The other fat guy he works with looks like a linux fan

ocean walrus
#

he doesn't have any reason to

lofty cypress
#

LMAO

ocean walrus
lofty cypress
#

No offense

ocean walrus
#

lmao

#

steam uninstalling gnome was a bit of a setback

wild herald
#

i have a question, i wanna make games in unity, i understand how oop works is python, wound that be enough knowlegde to try learning unity or should i learn pygame first?

lofty cypress
#

Unity works with python?

wild herald
#

no

#

im going to learn c#

#

im just wondering if i would have enough knowlegde to do it tho

ocean walrus
#

Sure

#

C# is an OOP language as well

#

And its not like you can't read a tutorial or two about unity before jumping in

#

Once you've learnt one languages, other language get easier to a certain extent

cursive agate
#

i get easier

ocean walrus
#

hm

static trout
#

aaaaaa its like 17 degrees celcius
im positively shivering

jolly hound
#

Been changing all my socials to match my discord name. I made this name when my grandfather and I set up his ps4(rip). I am debating to change it, should I or should I keep it?

cursive agate
#

rubbery revenge

#

such a mood

jolly hound
#

What

#

Oh

#

Yeah

cursive agate
pseudo trout
#

if my mail service only has 50gb shared between 50 people, would you still recommend using IMAP or should i switch to POP3 so i can save what little data i have? 😄

cursive agate
#

rescript seems interesting. hemlock introduced me to it iirc

pseudo trout
#

looks cleannnnn

cursive agate
#

i hear it was an alternative to typescript

#

but imma read some articles zzz gtg

ocean walrus
#

ah wait

#

reason is rescript

#

they just changed names LMAO

cursive agate
#

i wonder why these two exist. still kinda confused

ocean walrus
#

reason is rescript

cursive agate
#

but it has a different repo

#

damn. so theyre still the same but rescript is just bucklescript + reason

thick widget
#

also his name is anthony lol

thick widget
static trout
#

will there even be a rewind this year

#

last year they just... gave up

dusty aspen
#

What's rewind

thick widget
static trout
dusty aspen
#

What's that

thick widget
static trout
#

the yearly video that recaps the events on youtube

dusty aspen
#

and dislikes are being removed? ha

#

That's kinda funny

static trout
#

they've been doing it since 2010 or something

dusty aspen
thick widget
static trout
#

the early ones were liked

#

but the later ones were just dunked on

thick widget
#

yes

#

they didnt do 2020 due to covid

#

a shame they couldnt celeb their 10th anniversary

cursive agate
#

UwU

#

(●´ω`●)

dusty aspen
#

owo

#

the w in owo reminds me of a basketball hoop idky

serene dagger
#

uwu

static trout
#

nou

#

i need help

#

my spawn point has 2 drowned who snipe me every time i spawn

#

so i repeatedly get spawn killed

#

wat scam dis

hearty prawn
hearty prawn
#

@dusty aspen what's up dawn

ocean walrus
#

@dusty aspen no ansewr??!@??!

hearty prawn
#

hey aboo

dusty aspen
#

nothing rn

#

just doing some homework

hearty prawn
#

not me trying to make a compiler

ocean walrus
hearty prawn
#

nice i'm in school

dusty aspen
ocean walrus
#

damn

hearty prawn
#

my school required you to own a mac

ocean walrus
#

damn

hearty prawn
#

and they haven't blocked discord yet so..

#

yeee

ocean walrus
#

my school did, but they allow us to change the DNS number, so that just unblocks everything

hearty prawn
#

oh

#

if i need to unlock something i just go on my phone's hotspot

dusty aspen
#

My school gave us these terrible $50 chromebooks

#

We can't bring our own computers since no one knows the wifi password

#

They don't even make it your school username/passwords for wifi or anything

hearty prawn
#

our wifi password is our school email and school password

dusty aspen
#

That's what my old school did

#

but not here 😔

hearty prawn
#

dan

dusty aspen
#

the chromebooks are so slowwww

hearty prawn
#

saddd

#

i'm here in school using a m1 mac pro with nasa internet speed

static trout
#

which school do you go to that requires macs

#

a bit too preposterous

dusty aspen
hearty prawn
#

it really is

#

i'll send a photo when i can lmfao

static trout
#

also im a bit suprised by 2 things

#
  1. ur allowed devices in school?
#
  1. ur given internet?
hearty prawn
#

yeah

static trout
#

wow.

dusty aspen
#

wait you're not allowed those things?

hearty prawn
#

us freshman's are allowed cool stuff

dusty aspen
#

If you don't mind saying, where do you live? (country/state/whatever)

hearty prawn
#

they middle schoolers aren't

hearty prawn
fathom yew
#

Rust has started freaking me too early, those colons and dots!!!! 😭

dusty aspen
#

I was asking Bacon

neat glen
#

awkward moment

shrewd shadow
hearty prawn
neat glen
hearty prawn
#

WHY .

neat glen
#

i'm just not motivated enough

dusty aspen
static trout
neat glen
#

i'ma stick with python

static trout
#

apparently you can take phones in 10th

#

but otherwise nope

fathom yew
dusty aspen
#

oh. so Vec::new() is an associated function? I think I have this all confused

hearty prawn
dusty aspen
#

oh wait of course it is

teal storm
#

:p

dusty aspen
#

I'm an idiot

teal storm
#

patpat it ok

#

bruh

sick olive
#

How about any Haskell pros lirikHMM How do I properly spread the 2nd if over multiple lines? hs helper f n = do if n == 1 then f else ( if (mod n f == 0) then (helper f (div n f)) else (helper (f + 1) n) ) main = print(helper 2 600851475143)

teal storm
#

that's rude @fathom yew

sick olive
#

Keep getting parse error (possibly incorrect indentation or mismatched brackets)

ocean walrus
fathom yew
ocean walrus
#

what awas a joke

ocean walrus
#

what happended

sick olive
#

but it works fine if I do else (if (mod n f == 0) then (helper f (div n f)) else (helper (f + 1) n))

little sparrow
#

♿ js has the worst snytax

dusty aspen
ocean walrus
#

oh

dusty aspen
#

wdym JS syntax is fine

ocean walrus
#

yeah its not that bad

neat glen
#

gib me some motivation on learning pls

ocean walrus
#

now the language itself, thats a different question

little sparrow
#

i really cant stand with it

dusty aspen
neat glen
dusty aspen
sick olive
dusty aspen
neat glen
teal storm
#

@sick olive do notation isn't just multiline
haskell has multiline expressions by default
do notation is sugar for the monadic bind (>>=) and bind-drop (>>) operators

sick olive
#

uhh

#

I know some of those words lirikHMM

fathom yew
dusty aspen
teal storm
#

for example this

main = do
    i <- getLine
    putStrLn i

is sugar for this

main =
    getLine >>= \i -> putStrLn i
dusty aspen
little sparrow
#

👆 tbf i never really give it a chance

ocean walrus
#

tui :D

fathom yew
teal storm
# fathom yew

it's really not difficult

  • is it a method (operates on a value of the type) or an associated function (just a normal function that is connected to the type)?
    • method -> .
    • associated function -> ::
neat glen
#

oops i pinged soworry

neat sparrow
#

sO SLEEP Y I CAN'T Vene type [roperly

dusty aspen
neat glen
teal storm
dusty aspen
mighty cove
#

how would 111101 be turned into 111000

#

i don't think it's a bit shift

sick olive
teal storm
mighty cove
sick olive
teal storm
teal storm
#

... & -8

fathom yew
#

ig I shouldn't go with rust too early... I should strengthen my Python...

neat sparrow
#

yeah strengthen your python first

fathom yew
#

"my python" lmafoo

#

🐍

mighty cove
#

i just do not see a constant relationship here

#

between A and B that happens every row

#

first i tried converting them to base 10

static trout
#

what does that give

mighty cove
#

in base 10?

static trout
#

ys show in base 10

mighty cove
#

111101 = 61, 111000 = 56
001101 = 13, 11001100 = 204
011001 = 25, 110000 = 48

#

i must be losing my mind if there's a clear pattern here

teal storm
#

i sure don't see it

sick olive
#

Me neither

#

shift left a few times then subtract itself or something lemon_glass

hearty prawn
#

haskell weird

teal storm
#

plug it into oeis
it's a shot in the dark but you never know

teal storm
mighty cove
#

what's oeis?

hearty prawn
#

I NEED TO MAKE MY OWN AST METHOD :(

teal storm
hearty prawn
#

time to yoink it from online

teal storm
mighty cove
#

wait so what do you do here

hearty prawn
#

my brain no worky

mighty cove
#

w oesis

teal storm
teal storm
hearty prawn
#

i meant data type sry

teal storm
#

yeah

#

smh just use haskell

hearty prawn
#

why

sick olive
#

Was there supposed to be a pattern there?

hearty prawn
#

i'll need to learn a language to make a language

mighty cove
#

apparently so but maybe they messed it up

sick olive
#

Wait, can haskell even handle an int as large as 600851475143

sick olive
#

It works so I guess so pithink

cursive agate
#

hiiiiiii

#

uwu

hearty prawn
teal storm
#
data AST
  = Ident String
  | IntLiteral Integer
  | FltLiteral Double
  | StrLiteral String
  | Plus AST AST
  | Minus AST AST
  | Times AST AST
  | Divide AST AST
  | FunCall AST [AST]
```for example
#

ezpz ast

hearty prawn
#

i see

#

averyy look at the stackexchange link i sent

teal storm
hearty prawn
cursive agate
#

uwu

cursive agate
#

haskull

teal storm
hearty prawn
#

ah

#

i might just need to use rust

pastel moss
#

enums are in many languages + you don't necessarily have to use it

teal storm
# hearty prawn it seems cool

the shunting yard algorithm is very good but very narrow in scope, it can only really be easily applied to grammars consisting of:

  • literals
  • infix operators w/ defined precedence and associativity rules
  • function calls (ml-style)
  • parens (for grouping)
dusty quarry
#

Should there be bail in the justice system?

teal storm
teal storm
mortal hull
#

bail seems pretty legit

hearty prawn
#

alright rust learning montage moment

sick olive
#

Is this correct rust let n: i64 = 600851475143;

dusty quarry
#

no one getting mad

sick olive
#

I don't need a L in the literal or something lirikHMM

mortal hull
#

let n = 600851475143i64;

sick olive
mortal hull
#

i think i32

oak hemlock
#

yeah i32

mortal hull
#

but the suffix there makes it i64 literal

oak hemlock
#

if the literal is bigger, it'll switch to i64

sick olive
#

that number doesn't fit in 32 bits

oak hemlock
#

maybe not an amazing idea to put it there

hearty prawn
#

rustTIME

#

rust can do anything correct

mortal hull
#

it can compute any computable function

teal storm
# sick olive is 64 bit default?

i32 is default, the type can be inferred from things like function signatures but if thats not enough then the suffix for each type is just the type itself, for example if i want 8 as 16 bit signed integers i can just say 8i16 or, even better, 8_i16 the _ is just like in python it is ignored but you can put it there to make number more legible like for example 1_000_000

#

and like phyceral said if the number is too big it defaults to the next largest signed integral type

sick olive
#

When I removes the i64 it warned me about it so I put it back = note: the literal `600851475143` does not fit into the type `i32` whose range is `-2147483648..=2147483647

teal storm
hearty prawn
#

isn't rust the language that screams at you for have un-used variables

#

or is that golang

teal storm
#

so you may have been expecting it to default to i32 but then it didn't

dusty quarry
#

golang is specifically for networking right?

sick olive
hearty prawn
#

it's mainly used for web-dev @dusty quarry

#

it's got a good system of managing endpoints and stuff

#

me likey

dusty quarry
#

what's good?

teal storm
dusty aspen
hearty prawn
#
package main

import (
    "fmt"
    "log"
    "net/http"
)

func homePage(w http.ResponseWriter, r *http.Request){
    fmt.Fprintf(w, "Welcome to the HomePage!")
    fmt.Println("Endpoint Hit: homePage")
}

func handleRequests() {
    http.HandleFunc("/", homePage)
    log.Fatal(http.ListenAndServe(":10000", nil))
}

func main() {
    handleRequests()
}
solid prawn
#

is there ever a reason to have unused vars in prod

teal storm
neat sparrow
#

oi

hearty prawn
#

oi

teal storm
teal storm
#

unused vars should be a warning, nothing more and nothing less

solid prawn
#

yeah ig warnings are good enough

teal storm
#

if you want it to be an error simply put #![deny(unused_variables)] at the uppermost module

hearty prawn
#

hm

#

i'm going to learn rust later

teal storm
#

the fact that i can't test golang code if it has unused vars (because surprise surprise i want to test things before i am completely done with them, shocker) i literally just can't and then i gotta do something stupid like log it for no reason just so it compiles

dusty aspen
#

wait wtf

#

do they not have compiler lints or anything rather than just breaking

teal storm
hearty prawn
#

didn't google make golang

mortal hull
#

tfw not snake_case variables are a compiler warning

hearty prawn
#

lmfao

dusty aspen
#

that's great

teal storm
mortal hull
#

?

hearty prawn
#

camelCase best

sick olive
#

That is annoying. Go really doesn't like unused stuff n declared but not used imported and not used: "fmt" ducky_australia

teal storm
dusty quarry
#

Why do babies cry?

sick olive
#

Attention ducky_tube

hearty prawn
teal storm
hearty prawn
teal storm
dusty quarry
#

thisis random channel

hearty prawn
#

***ep it clean and respect ongoing conversations. See ***

#

***respect ongoing conversations. See ***

dusty aspen
hearty prawn
#

respect

hearty prawn
dusty aspen
#

why though

#

I don't understand

hearty prawn
#

idk

dusty quarry
#

How many stars are in the sky?

little sparrow
#

billions

onyx ice
#

More then 3

dusty aspen
#

more than you will ever count

little sparrow
#

isnt camelCase pretty common

sick olive
#

Do you need brackets { } around single expressions like in an if in Go and Rust?

dusty aspen
#

yes in Rust, idk about go

dusty aspen
little sparrow
#

hm.. i guess so

dusty quarry
#

y yer so lazy for the brackets?

dusty aspen
#

I wouldn't go so far as to call it laziness, I think it'd be clearer without for single line ones

#

sorta like how match can have one line stuff

sick olive
#

Go seems to require them syntax error: unexpected f, expecting {

dusty aspen
#

I wonder if that'd be a pain to parse

#

I doubt it

sick olive
#

But what lemon_warpaint you can't do math on diff int types? n % f (mismatched types int64 and int

dusty quarry
#

ye

#

one is 32 bitsand other is 64

teal storm
sick olive
# teal storm wdym

Like in Java/C#/C/C++/JS you can do if (foo) bar; instead of ```
if (foo) {
bar;
}

teal storm
#

rust never ever ever ever ever does implicit type conversions, which is sometimes annoying but probably ultimately a good thing

teal storm
little sparrow
#

u can do that..?

teal storm
dusty quarry
dusty aspen
#

I mean it's really easy to do it explicitly (with (numeric) primitives, at least)

dusty aspen
teal storm
dusty quarry
#

I tried it and do it all of the time

dusty aspen
#

in what language

teal storm
solid prawn
#

:laughingat:

teal storm
#

i think you didn't read the question

sick olive
teal storm
dusty quarry
#

I don't use brackets in pyton

teal storm
#

use as i64

cursive agate
#

https://www.youtube.com/watch?v=qvNyo1-AK6o imagine Tedx getting scammed

Do you ever wonder why some people seem to get lucky and make it look so easy to succeed, while so many others (maybe even you) struggle and fail to get what they want? You see these individuals around you who seem to have it all, and you ask yourself, why can't you? Dan Lok wants you to know that you can have everything you've ever wanted and t...

▶ Play video
sick olive
teal storm
teal storm
cursive agate
mortal hull
#

java does widening conversions for you, rust doesn't

dusty quarry
cursive agate
dusty aspen
#

Yes I use them for dicts and sets

teal storm
dusty aspen
#

I know that's not what you mean but I feel like being pedantic

cursive agate
#

xD

mortal hull
#

you don't "have to" call them anything

teal storm
#

well calling it upcasting in java would be incorrect

sick olive
#

The right pinky has too much keyboard responsibility ducky_cheese

teal storm
#

since the primitive types are completely distinct from the rest of the type system, basically

mortal hull
#

i use my ring finger for semicolon lol

teal storm
#

cringe

cursive agate
#

jk. that is so inefficient

dusky inlet
#

i use 3 in one and 2 in the other

sick olive
#

Learning to touch type is a super handy skill, whether you guys are joking or not ducky_party

#

But I still get numbers mixed up lirikFEELS

cursive agate
dusty quarry
#

Stephen Hawkin: Peasants

hollow holly
#

On phone, I sometimes reach 110 WPM

#

idk how, most of the time I'm at 90 WPM

dusty aspen
#

how

#

I'm probably a solid 20 on my phone

hollow holly
sinful lark
#

i only use my index fingers to type

#

90-100wpm

cursive agate
#

i use my toes to type and i get 200wpm

neat sparrow
#

I use my ass to type and get 666 wpm

cursive agate
#

i use my cat and i get a whopping 1milliown wpm

#

meow

ocean walrus
#

Amateurs

#

I type at infinite wpm

cursive agate
ocean walrus
#

You imply I'm lying

#

Which I'm not

#

I'm merely stating facts

serene dagger
#

hm

cursive agate
ocean walrus
#

Lies

#

You can't out lies me

cursive agate
#

i really like aboo when he says Lies

ocean walrus
#

Lies

cursive agate
#

damn. im fanboing this persona

ocean walrus
#

I like it whenever I say anything

serene dagger
ocean walrus
#

Lmao

cursive agate
ocean walrus
#

Wat

#

I am indeed 14

#

Oo remember sears

#

The store

#

I liked it

cursive agate
#

searsX ?

ocean walrus
#

No just sears

#

What's searsX

sick olive
neat glen