#ot2-the-original-pubsta

652 messages Β· Page 63 of 1

round moss
#

since C++ wasn't good enough for mozzila

wide totem
#

πŸ§€

static raptor
#

@lean birch they referring to you πŸ€”

#

?

lean birch
lean birch
# static raptor <@206756345108627457> they referring to you πŸ€”

ah, found it. All I had to do with that was that I edited the question and fixed their formatting, five years ago KekDoggo No idea why they'd try to ping me because of that, probably just saw my name on the page. It's here https://askubuntu.com/q/825327/367990

#

I deleted that comment, lol

static raptor
#

hahaha nice

#

found it funny to see a ping of you on a random programming horror thread

steel eagle
#

Back on the rust thing (SOrry a bit busy today) but yeah, I can make a multithreaded application so easily in Rust, even scaling out to the 24 cores of the rackmount we have in the laundry room

#

granted, I can do that on Python, too. But the use cases for those two things are far different :)

wide totem
#

πŸ˜‚

steel eagle
#

Lol

#

There's a story there

civic plank
#

Found this on r/ProgrammerHumor

#

pretty funny πŸ˜†

wide totem
#

react native?

civic plank
#

probably just react in general lol

languid osprey
#

hm

#

react is cool

civic plank
#

true. but on the react discord server its so common to see people who know only the "react" framework itself

#

like some dude says he doesnt know how to write basic js, only knows jsx

#

the web dev job market has a shit ton of react requirements, so im not surprised

wide totem
#

@languid osprey hi :D

languid osprey
#

Hey :D

#

Why ping in different channel

wide totem
languid osprey
#

YES

#

This is amazing

#

You have ascended

wide totem
languid osprey
#

Ok

wide totem
viral hare
#

react or more like redux ptsds for me

#

never touching it again

wide totem
#

WHAT THE FUCK RUST HAS DOCUMENTATION BUILT IN

echo fern
#

it gets made from docstrings, yes

#

Python libraries often do the same

wide totem
#

yes i named my crate rusty

#

i am so lost regardless rn

hazy laurel
#

lost osul.

wide totem
#

where is how to use ::?

hazy laurel
#

soul

hazy laurel
viral hare
#

i think its called scope resolution operator

hazy laurel
#

unless I've misread

#

in which case... I'm out

viral hare
#

or maybe thats what its called in c++ but not sure if rust calls it the same

wide totem
#

example usage:
use std::io;

#

this is importing io from std i think?

viral hare
#

yeah thats trying to use something from a namespace

wide totem
#

from The Book

use std::io;

fn main() {
    println!("Guess the number!");

    println!("Please input your guess.");

    let mut guess = String::new();

    io::stdin()
        .read_line(&mut guess)
        .expect("Failed to read line");

    println!("You guessed: {}", guess);
}
wicked hollow
#

Python ships with docs, too, technically. On a Unix machine, try python3 -m pydoc -b

wide totem
#

i think that :: is like . in python?

#

py: io.read()
rs: io::read()

assume that read is a valid method

viral hare
#

its for scoping

#

like i mentioned above

#

except in python the dot operator can also scope

wicked hollow
#

right - so Python's sys.stdin is Rust's io::stdin

hazy laurel
#

cause you don't have to initialize io

#

What're they called? Non-associative methods?

viral hare
#

think its called static

hazy laurel
#

huh. probably lol

wide totem
#
let mut guess = String::new();

let - defines variable
mut - allows the program to edit it later
guess - name of the variable
= - assignment operator
String - Built in class String
:: - pretty much equal to . in python
new - the method to create a new string object
() - calls the method
; - rust syntax

hazy laurel
#
:: - pretty much equal to . in python 

This is a little incorrect, though

#
class Foo:
    @staticmethod
    def bar():
        pass

Foo.bar()

In this context, yes. In Rust you'd use Foo::bar()

#

However, if you did

class Foo:
    def bar(self):
        pass

you'd do foo().bar() in both Rust and Python

#

Well, in Rust... you'd probably actually do like foo = Foo::new() and then do foo.bar()

wide totem
hazy laurel
#

because it's not a static method

#

it's associated with "self"

tranquil ridge
#

:: is for directly accessing from the struct/enum and . is for accessing from instances

wide totem
#

ahhh

#

ok

hidden kernel
#

!mute 727402153156673556 πŸ”

clever salmonBOT
#

:incoming_envelope: :ok_hand: applied mute to @oblique scroll until 2021-06-08 05:51 (59 minutes and 59 seconds).

wide totem
#

pardon my caps

#

holy shit

#

so

#

WHITESPACE DOESN'T MATTER IN RUST

hazy laurel
#

uh

wide totem
#

i can write my code and not worry about formatting until after

echo fern
#

that's how it is in most languages, yes

wide totem
#

yes ik

#

its been a while

echo fern
wide totem
#

I have used autohotkey and java, but not for a few months

wide totem
#

but its actually formatting my code and removing a new line i really really want for rn

#

and something sucks

#

i was running it with a debugger, made some edits, and vscode did not recompile

#

hm, what flags is taht

wide totem
echo fern
#

rust-analyzer actually gets really laggy for me sometimes, so I probably shouldn't

wide totem
#

Ah

#

I'm still deciding between rust and rust-analyzer

#

Since rust analyzer warned me about having them both on lol

odd sphinx
#

rust-analyzer

#

only one at a time

#

bro

wide totem
#

Lol

sweet meteor
#

theres so much about rust in this server these days

#

not complaining

odd sphinx
#

yes

woven hornet
#

what is segmentation fault?

#
int main(void)
{
    char key[5];
    string n[5] = {"a, b, c, d, e"};
    for (int i = 0; i < 5; i++)
    {
        //check if it's all alphabets
        if (isalpha(n[i]))
        {
            key[i] = tolower(n[1][i]);
        }
    }
    printf("%s", key);
}
#

i get it jus from doing this

#

it can compile

round moss
#

whats string

woven hornet
#

an array of characters

#

but i included the cs50 library

round moss
#

so string is char const[]

#

anyway, segmentation fault means you accessed an array out of bounds generally

odd sphinx
#

usually

#

i watched cs50

dusky cliff
#

string n[5] = {"a, b, c, d, e"};

odd sphinx
#

its good

dusky cliff
#

isn't this just one string

round moss
#

I mean, that is fine

#

it is probably not what they want

dusky cliff
#

yeah

odd sphinx
#

yes

round moss
#

but it shouldn't segfault

#

actually, that is bad nvm

odd sphinx
#

n[5]

round moss
#

the default initializer for a pointer is NULL

odd sphinx
#

when its not 5 long

round moss
#

so that array {"that string", NULL, NULL, NULL, NULL}

odd sphinx
#

ohh

#

lol

#

makes sense now

round moss
#

so yes, that will segfault

dusky cliff
#

"a", "b", "c"

round moss
#

yup^

odd sphinx
#

^

#

@woven hornet

woven hornet
round moss
#

yup

odd sphinx
#

ye

woven hornet
#

it still says segmentation fault

urban viper
#

don't tolower and isalpha operate on chars?

odd sphinx
#

@woven hornet did u mean key[i][1]

#

or somethi

round moss
#

I think they are special functions made by them earlier

odd sphinx
#

idk what key is here

#

yes

round moss
#

n[1][i] is wrong, yes

woven hornet
#

yeah

#

i jus changed it

#

but still segmentation fault

odd sphinx
#

bruh

round moss
#

could you post the fixed program?

odd sphinx
#

what are u doing here

#

im kinda confused

round moss
#

actually, better idea

woven hornet
round moss
#

learn how to use valgrind

#

and debug builds

odd sphinx
#

tolower(n[i][1]) ?

odd sphinx
round moss
#

well, they clearly need it now

odd sphinx
round moss
#

not later

odd sphinx
#

lol

#

true

#

i think they want them to fix these kinds of issues by themselves before introducing better tools

round moss
#

IG

#

so IG do as the course says and suffer

odd sphinx
#

lol

#

is this ur lab problem?

woven hornet
odd sphinx
#

i see

#

can u send us ur code as it is now

#

after all that editing

woven hornet
#

the wholle thing?

odd sphinx
#

no

#

just the part that ur sure breaks

#

the part u sent earlier

#

i mean

odd sphinx
#

ok

woven hornet
#

my code above didnt make sense

odd sphinx
jovial island
#

yeah there

gusty rivet
#

@jovial island
i wanna do this without having to repeat the query selector, i thought i might be able to use this for doing so but i havent been able to get it working

document.querySelector("#testselector").addEventListener("mouseover", () => {
    document.querySelector("#testselector").classList.add("testsuccess");
});
jovial island
#

also @hot pulsar here.

#

as you replied something

hot pulsar
#

yea that worked for me

#

just assign the selector to a var lol

jovial island
#

That's not the same element, though

hot pulsar
#

??

#

yes it is?

gusty rivet
#

i guess, still that feels sloppy to me, i would have thought there would be some way to reference the element that has the listener on it

jovial island
#

we get event and by event we can get source

hot pulsar
#

probably can, you probably dont want an anon function

jovial island
#

Oh, I meant the element in the first and second screenshot are not the same element

hot pulsar
#

yes, they are

jovial island
#

Hmm

jovial island
gusty rivet
jovial island
#

yeah

#

hold on im writing code

gusty rivet
#

just console logged event, seems like it has event.target so I'll try that

#

Success!!!

jovial island
#
temp1.addEventListener('mouseover', event => {
  var source = event.target || event.srcElement;
  console.log('hey', source)
})
#

thats it

#

there's a reason why || lemme see

dusky cliff
#

if target is undefined it takes the srcElement ig

jovial island
odd sphinx
#

ye

gusty rivet
#

seems odd that the target could be undefined, i thought it would be the queried element at temp1? or is it when there are multiple elements at temp1 eg a class selection

jovial island
#

we got the solN but not 100% answer

gusty rivet
#

is it that srcElement would be the element that triggered the event, whereas target would be the selector element

hot pulsar
#

this works

jovial island
#

.srcElement is deprecated

#

Initially implemented in Internet Explorer, Event.srcElement is a [non-standard] alias (defined in the DOM Standard but flagged as "historical") for the Event.target property.

hot pulsar
#

your issue i think is your anon function use

#

it doesnt bind this

#

you need to not use an anon function so 'this' is the div rather than the page or smthg

gusty rivet
#

ohhhhh

jovial island
#

okay so event.target is good enough then probably

#

Yeah

hot pulsar
#

dont need event.target or anything tho

gusty rivet
#

i forgot that arrow functions reference this of the nearest parent function

jovial island
#

@hot pulsar how?

gusty rivet
#

rather than binding their own this

jovial island
hot pulsar
#

i linked it

gusty rivet
jovial island
#

oh yeah you're not using arrow thats why

hot pulsar
#

you dont have to make a whole new function saved if u want you can just put it all in the event

document.querySelector('.class').addEventListener('mouseover', function mouseover() {
    this.classList.add('hi')
});```
#

i like making new func just in case u wanna use it again tho but ye

jovial island
#

you can still bind this if you wonna use fn but that'd be overkill

hot pulsar
#

it doesnt seem to work on googles site tho

#

not sure why

gusty rivet
jovial island
hot pulsar
#

i cant get it to add it to the div of the text on googole

jovial island
hot pulsar
#

hmm

jovial island
#

docu.queryselector will return null

hot pulsar
#

oh, it did add it somehow

jovial island
#

oh its giving

hot pulsar
#

wtf??

#

why doesnt it show in elements O_O

jovial island
#

Probably close and re-open the Developer Tools?

dusky cliff
jovial island
#

working in mine

#

document.getElementById('aa').addEventListener('mouseover', (e) => {console.log(e)})

#

tho i used by id, but doesnt matter its html element

#

MouseEventΒ {isTrusted: true, screenX: 274, screenY: 199, clientX: 272, clientY: 128, …}

hot pulsar
#

ohhh im dumb

#

it only grabs the very first one

#

i forgot how query selector works LOL

jovial island
hot pulsar
#

yea u gotta do the query all if you want a list of everything

#

selector is just the very first element that matches πŸ˜›

hot pulsar
#

its all about callbacks and shit

jovial island
hot pulsar
#

gross

jovial island
#

nah

#

promises are love

hot pulsar
#

i prefer the sugar of async/await over promises

jovial island
#

purest form of love

hot pulsar
#

promise chaining is ugly imo

#

asyncawait is cutie pie

#

😻

jovial island
#

but its too flat

#

while promises make it kinda readable to me

hot pulsar
#

@dusky cliff

jovial island
#

() => {}

odd sphinx
#

bruh

hot pulsar
#

uwu

jovial island
#

I would personally say async/await is still readable

hot pulsar
#

not sure how you can argue that async/await is anything but readable. its very python esque

#

line by line, this then that

jovial island
#

Yeah

#

its kinda opinion thing, thats why i don't debate over both.

#

but async await it too flat

hot pulsar
#
const makeRequest = () => {
  return getJSON()
    .then(data => {
      if (data.needsAnotherRequest) {
        return makeAnotherRequest(data)
          .then(moreData => {
            console.log(moreData)
            return moreData
          })
      } else {
        console.log(data)
        return data
      }
    })
}``` not sure how you can prefer this ^^ over this vv 

```js
const makeRequest = async () => {
  const data = await getJSON()
  if (data.needsAnotherRequest) {
    const moreData = await makeAnotherRequest(data);
    console.log(moreData)
    return moreData
  } else {
    console.log(data)
    return data    
  }
}```
odd sphinx
#

same

#

await is flat

hot pulsar
#

like yes, its more flat. i see your point you are right

jovial island
#

can't help but i like 1st way better.

hot pulsar
#

flat is love ?

odd sphinx
#

in some cases no

hot pulsar
#

i have no clue what im in when im in that middle console.log, how many am i deep, callback hell!!

jovial island
#

no flat is does not give handling on top view, promise gives nice top view

#

you can read without going in so much details if needed

hot pulsar
#

handlling eh?

const makeRequest = () => {
  try {
    getJSON()
      .then(result => {
        // this parse may fail
        const data = JSON.parse(result)
        console.log(data)
      })
      // uncomment this block to handle asynchronous errors
      // .catch((err) => {
      //   console.log(err)
      // })
  } catch (err) {
    console.log(err)
  }``` promise ^, async v

```js
const makeRequest = async () => {
  try {
    // this parse may fail
    const data = JSON.parse(await getJSON())
    console.log(data)
  } catch (err) {
    console.log(err)
  }
}```
jovial island
#

while in async await you need to find

dusky cliff
#

yeah ik you can pass functions like

mainFunc(()=>{callback shiz})

but
didn't know

mainFunc(function callback(){callback shiz})

is valid too

hot pulsar
#

to be fair, i think that example is a bit loaded to make it biased. they put in a lot tof comments on the top

jovial island
dusky cliff
#

yeah

#

didn't know that function f(){} returns the function it defines

odd sphinx
#

wats the diff between function() {} and () => {}

jovial island
#

being a react guy i always used () => from day one in js

dusky cliff
#

^

odd sphinx
#

never understood this

hot pulsar
#

theres still time in react to not use ()

odd sphinx
#

in js

hot pulsar
#

i may or may not have that bookmarked and slowly read it to keep reminding myself

#

the main issue is you just need to keep track of what 'this' refers to, and thats why you need to use both anon functions () => and the older normal function name() {}

#

anon doesnt show up in call stack and doesnt bind this to it

#

so this will refer to whatever is the object above that function

wheat aurora
#

Wheeee ActiveClient needs to be updated before I can do literally anything. Today's off to a productive start -_-

dusky cliff
#

I'll take it

#

would have got 18 but brain.exe stopped working for a second

hot pulsar
#

not even worth learning those man

#

how do you know those random things that dont matter but you dont know this !!

rigid echo
dusky cliff
#

idk i found it on reddit

hazy laurel
#

I only got 13

#

this is why I never wanna learn JS

dusky cliff
#

lol

shrewd lance
#

20/25

#

Though I can't say I'm happy I know that

#

Like I'd rather not have all this in the language at all than know most of it

dusky cliff
#

pro

#

[] not being falsy was unexpected

#

also i had no idea [,,,] is a thing

shrewd lance
#

[] not being falsey used to weird me out, but that's just how JS rolls

#

The only falsey things are undefined, null, empty string and 0

#

As well as false, obviously

odd sphinx
#

[] being false would be useful

shrewd lance
#

The truthiness of objects is basically "If it exists (i.e. is not null or undefined), it's truthy", so empty arrays are considered truthy

odd sphinx
#

noobscript

shrewd lance
#

I tripped on the trailing comma, Math.pow, misclicked on true++ (lol), null+0 and something else, I forget what

odd sphinx
#

true++ πŸ™

shrewd lance
#

Oh, and true == 'true', that one

dusky cliff
#

i got the true == 'true' right

shrewd lance
#

Funnily enough, I only figured the octal one out because I remembered python prohibits leading zeroes and demands 0o instead, and JS (unlike python) is nonsense, so it probably treats that as octal

hot pulsar
#

entirely solved by just not using ==

#

and using typescript

#

you can be a great coder and know all of 0 of these, because they actually dont matter

#

you do it to yourself lol

shrewd lance
#

True that

#

Though fuck javascript still

dusky cliff
#

i knew the octal thingy because i learnt it at school πŸ˜›

hot pulsar
#

ye fuck js

#

heck yea ts

shrewd lance
#

TS is the relatively sane version

#

It doesn't relieve you of shit like this binding, but it solves most of the problems I have with it

hot pulsar
#

i dont find this hard tbh

#

but im sure i maybe just dont make complex enough applications

#

its simple enough on a base level, it pass through anon and it doesnt pass through non anon. ez pz pick the function type you want and it all works

odd sphinx
#

no

hot pulsar
#

yes

#

:^)

#

i mean you gotta memorize the different uses and check back if u forget but like

#

the concept isnt hard

#

you can also just manually bind if you want, const self = this and then you can use self all over and deeper and without caring about what your doing and itll work

shrewd lance
#

I mean, the part that broke everything for me was that I assumed doing obj.method would bind this automatically, naive, I know

#

It took me a while to figure out why would this be undefined when iterating over an array of "bound" methods, and then I just converted the methods to arrow functions

hot pulsar
#

my go to is just always use arrow functions unless i want to manually rebind this, then i use a named function. works well enough tho it may be a little bit of a naive way of doing it since that possibly hurts the stack

#

i mostly use node tho not web js so maybe its different. i havent really seen it hurt me yet

shrewd lance
#

I guess I'm just spoiled by python semantics

hot pulsar
#

python definitely spoils us

odd sphinx
#

lol

#

i got 13/25

#

i dont know muich js

#

ok?

hot pulsar
#

ok

odd sphinx
#

lol

shrewd lance
odd sphinx
#

damn

shrewd lance
#

I still rewatch the DAS "Wat" talk from time to time

#

Golden content

hot pulsar
#

yea its great lol

#

man i am really liking frontend ive built some super cool stuff last week or two using just html/css thus far

dusky cliff
#

show pics πŸ‘€

hot pulsar
#

nothing really to show, just recreating shit like googles homepage, apples homepage etc

#

its not functional no links work etc

#

i also tend to give up 2/3 of the way through so its a little janky, but i could easily do the rest if i cared to devote another 10 hours to making it look perfect

#

but its cool ive never done uis before

#

:D

hazy laurel
#

man. I've gotta try frontend some day

#

but but... JavaScript and HTML and CSS

hot pulsar
hazy laurel
#

.bm 851829406279532564

#

I'm on mobile, but I'll definitely take a look in a bit

hot pulsar
#

i mean, idk if its the best or greatest way to learn haha, but its working for me

#

i can ez build non functional cause no js but looks good web pages like the major sites

#

js comes next

hazy laurel
#

Yeah, I only care for learning the basics for most things

hot pulsar
#

i know node but idk much about editing the document

hazy laurel
#

I'm a believer in "experience is everything"

hot pulsar
#

they have a small section on ui/ux which is what im running through right now, not learning much for this part tho

#

im not a creative type

hazy laurel
#

I really only know how to use Rocket to serve don't static files

#

some

#

beyond that β€” I'm clueless

hot pulsar
#

idk what you just said lol

#

rocket to serve dont static

hazy laurel
#

I meant some

hot pulsar
#

ah

odd sphinx
#

rocket

hot pulsar
#

πŸš€

hazy laurel
#

it's quite neat

shrewd lance
#

Tbh you don't really need a deep understanding of editing the document with JS, your framework does that for you, whether it's react, angular or vue

hot pulsar
#

well, i want to learn vanilla first

#

then move into react

#

i did a bit of react already its quite cool, and making the same html elements all by calling the same function twice with diff args and stuff, super sweet

hazy laurel
#

I've been wondering if I should eventually try out Yew

hot pulsar
#

but i want to be able to make a decently good page with pure vanilla and doc editing and stuff first before i hop on the ez pz ride

hazy laurel
#

I wanna be ambitious

shrewd lance
#

yew sounds pretty good

#

Python wasm interpreter for a decent frontend language when

hot pulsar
#

full stack python eng πŸ™€

#

wen

#

gib

shrewd lance
#

Technically you can do that already

#

Brython is a thing, and it's p good, but the load time is a little, uhhh, bad

#

There were some others, but brython was the most faithful one IIRC

hazy laurel
#

Brython the JS one or the Java one

#

or am I confusing things

shrewd lance
#

I only know the JS one

hot pulsar
#

i mean, maybe you technically can, but its not like 'good' yet

shrewd lance
#

Browser python

hazy laurel
#

i think I'm confusing this for an interpreter

shrewd lance
#

The only bone I have to pick with it is the startup time

#

From a dom modification standpoint, it's leagues more convenient than JS

#

True

hot pulsar
#

lmao

shrewd lance
#

It's treated more like a toy than a serious tool

#

And tbh in its current state it really is

hot pulsar
#

hmu when there is a react built in python

#

full stack python eng

shrewd lance
#

There was some weird project that was basically a python copy of react

#

But it didn't run on the frontend, it used a websocket to connect to the server that actually handled the script

#

Which was uhhhh

#

Bad

#

Interesting project otherwise

hazy laurel
#

I like the direction WASM is going in tbh

shrewd lance
#

WASM definitely has a lot of potential, I'm all for it

#

Yet again,
Python interpreter in WASM when

wide totem
#

what was WASM

shrewd lance
#

Web ASseMbly

wide totem
hazy laurel
#

Rust does

#

idk about TS

shrewd lance
#

Typescript doesn't need to IG

#

Since it compiles to JS and JS can already run in the browser

wide totem
#

ah

#

so wait

hazy laurel
#

performance tho

shrewd lance
#

Still salty that JS is the one who gets the special treatment πŸ˜’

wide totem
#

WASM is another language?

wide totem
hazy laurel
#

it's like... binary for browsers I thought

shrewd lance
#

Pretty much

#

Or CPython

#

Higher level bytecode, pretty much

wide totem
#

LOL

#

exception handling is still in progress

hazy laurel
#

It's crazy you could entirely run a browser from a browser

#

well ... eventually

wide totem
#

i mean

#

windows xp in browser emulators exist

#

but ig its not actually running in the browser

languid osprey
#

Rust has built in support for it, cuz LLVM

hazy laurel
#

I mean eventually it's entirely possible browsers will become home to half of what you currently do

#

like... IDE? Sure. Games? Yuh. Other applications? Probably

languid osprey
#

Same

hazy laurel
#

Yeah, me neither... as long as browsers keep up

languid osprey
#

Its a type of compiler backend

#

Makes it so much easier to write compilers

#

Many languages use it

wide totem
#

i see some of the tradeoffs of static typing vs language flexibilty

hazy laurel
#

Rust and WASM are a godly duo

languid osprey
#

Indeed

wide totem
#

Rust is what you get when you expose bare metal wafer to the C.

shrewd lance
#

Doesn't Kotlin compile to WASM as well

#

That's also a pretty pog one

#

Oh, nevermind then

#

Brainfuck's all I need

languid osprey
#

haha

shrewd lance
#

Delete the others

wide totem
#

so basically

shrewd lance
#

I think it can, yeah

wide totem
#

rust and (kotlin or typescript) is all one needs

#

for like

#

full stack

shrewd lance
#

Technically you just need JS/TS

wide totem
#

ew go

shrewd lance
#

Node + JS on the front

#

But like

#

That's js, ew

languid osprey
#

Only rust

wide totem
shrewd lance
#

Still kinda ew ngl

wide totem
#

the reason i don't like go is because its made by google

shrewd lance
#

Like TS fixes a lot of issues with JS, but I'd much rather have... something else

languid osprey
#

you can compile Rust to JS too :DD

#

well, technically

wide totem
#

what can rust not be compiled to

languid osprey
#

Compile Rust to WASM, and compile the WASM to JS

wide totem
#

ah

languid osprey
#

React but Rust when

wide totem
#

i am so glad i didn't learn react native

languid osprey
#

haha

wide totem
#

although ig, can rust be used to create mobile apps?

languid osprey
#

Hm, let me check

#

Technically, I'd guess so

#

You can make GUI's in Rust

#

And you can compile APK's with rust

wide totem
#

how

languid osprey
#

You can use a custom linker and an Android SDK

#

Rust can compile to a lot

daring jay
languid osprey
#

I have no fucking idea

daring jay
#

Rust is not frontend, is it? (Without compilation)

languid osprey
#

You can compile it to JS

daring jay
#

But why

#

Just compile it

#

And be happy

languid osprey
#

no

#

no more js

#

just rust

round moss
#

rust has frontend frameworks

daring jay
#

And that's fine

#

Just why make React in Rust

languid osprey
daring jay
#

when you can use a Rust thing

languid osprey
#

oh yeah, rust has a similar thing, doesn't it

round moss
#

rust currently seems to be at the elm model stage

#

just well, slightly less obnoxious

daring jay
#

Idk

round moss
#

elm is a great language for very very few tasks

dusky cliff
#

Yew is ew amirite

wide totem
languid osprey
#

hm

#

I haven't used elm yet

#

I'd like to try F# though

round moss
#

unless you really need a working website, don't bother tbh

languid osprey
#

F# seems nice

round moss
#

it is mostly useless

languid osprey
#

lmao

round moss
#

I like it for learning functional programming due to nice errors etc

sly cipher
#

Yeah hold on F# is super nice

round moss
#

I am talking about elm

#

F# is pretty neat, yeah

sly cipher
#

Ah, good

#

That's the js FP language right?

round moss
#

fair warning with purescript

#

it is extremely heavy

sly cipher
#

Isn't there also immutable js?

wide totem
#

is this smth that @limber pollen wrote?

round moss
#

pure uses purescript, but they are not the dev for it

#

they made type level lists for it

languid osprey
#

F# is functional, right?

round moss
#

yup

limber pollen
#

I write stuff in it

wide totem
#

yes

languid osprey
#

Alright, what is it good for?

wide totem
round moss
#

but not as strictly purely I love math as haskell etc

languid osprey
#

is haskell worth learning

round moss
#

really depends

languid osprey
#

I might learn it for fun

round moss
#

there is very little that haskell is the best choice for

#

but it is very fun

sly cipher
#

The nice thing about F# is you can still play with it from the .net ecosystem

languid osprey
#

.net is cool

round moss
#

F# is nice because it has good C# interop, meaning you have enough libraries to actually get things done

sly cipher
#

So you can have your fun monads and TCO, but then make the calls from C#

#

So writing a web site, you could still host asp.net core in C#, but then write a lot of your business logic in F#

round moss
#

yeah, purescript is similar there

sly cipher
#

I'm looking that up now, that sounds interesting

round moss
#

you have unsafe js interop which means you don't have to deal with impure functions in purescript

wide totem
#

guys i went overboard on wsl

languid osprey
#

oh shit

#

Oh yeah, how the fuck do you move wsl to a different drive

#

I did it

round moss
#

no matter how "cool" and "interesting" monad transformers may be, they really suck to get right and don't have great error reporting

languid osprey
#

yeah, I did that

#

and it looks like it worked

#

but

#

But

wide totem
#

do you have wsl 2?

languid osprey
#

if I install apps on it, why the fuck does it take space on my C drive

wide totem
#

@languid osprey wsl --list -v

languid osprey
languid osprey
sly cipher
#

I think they're less academic and more practical than most people think

median blade
#

lol

languid osprey
#

lmao

wide totem
#

large d drive 😏

round moss
#

async await are monads

sly cipher
#

Oooh that I get

#

I'm not sure what you mean with type errors, are you referring to the purescript stuff?

round moss
#

I only ever used monad transformers in haskell, but I can't imagine purescript being any better

median blade
sly cipher
#

Wow purescript is cool

round moss
#

it is very similar to haskell

#

just slightly more modern

sly cipher
#

I doubt I'll get my team to go for it, but it would be way cool to get this kind of thing rolling here

round moss
dusky cliff
#

so

odd sphinx
#

@jovial island i am here to help

dusky cliff
#

ok

odd sphinx
#

hahastinkypoop sucks at python

jovial island
#

wow

dusky cliff
#

😒

undone root
#

can't we use a help channel

dusky cliff
#

true

jovial island
#

nah we're fine here

odd sphinx
#

lol

#

im just kidding hahastinkypop

dusky cliff
#

oh ok bro

odd sphinx
#

u are cooler at python

jovial island
#

help channel are kinda warm, no air circulation

odd sphinx
#

i was just PRANKING U

#

xdd

undone root
#

if it's python it should really go in a help channel

odd sphinx
#

i see what he means

dusky cliff
tranquil ridge
#

dont do it bro!!!

dusky cliff
#

w8 so are you getting a help channel

undone root
#

yes

odd sphinx
jovial island
#

ok yesntnt is yes

#

good

dusky cliff
#

lmao

jovial island
#

so i come from java background
so i understand scoping in simple terms

int whatever = 9;
{
int c = 9;
// yeah i know whatever
}
// what the fuck is c

while py is weird

if something:
  c = 5
else:
  c = 7

# WHY THE FUCK DO I KNOW c
#

so i mean its all global?

dusky cliff
#

ye, if-elses don't create their own scopes

tranquil ridge
#

yes

dusky cliff
#

neither do loops

jovial island
#

!e

if True:
  c = 5
else:
  c = 7
print(c)
tranquil ridge
#

yes

clever salmonBOT
#

@jovial island :white_check_mark: Your eval job has completed with return code 0.

5
odd sphinx
#

ye

tranquil ridge
#

thats why you can still acess

jovial island
#

so there is no scoping in py?

tranquil ridge
#

variables in for loops

undone root
#

can you please use a help channel πŸ˜”

odd sphinx
#

guys

tranquil ridge
odd sphinx
#

i think we need to listen to incosnstitentet time units

undone root
#

incostinnuvnifhjrd

odd sphinx
#

yes

dusky cliff
#

theelz.

odd sphinx
#

theelz

dusky cliff
#

oh wait its x apparently

undone root
#

dab

dusky cliff
#

theelx

tranquil ridge
#

but he was a random troll on the internet

dusky cliff
#

yes

#

no

jovial island
odd sphinx
#

lol

tranquil ridge
dusky cliff
#

its uvuvwevwevwe onyeteneninyenve ugwemubwem osas

tranquil ridge
#

functions variabels are local

odd sphinx
#

yes

jovial island
#

alright so why would they do it like this?

i mean

won't it cause runtime issue?

condition = someHellaBigCondition
if condition:
  a = {'b': 5}
# now to access a.b i need to even check a
odd sphinx
#

u can check it in the if condition

#

if u want to be sure that a exists

undone root
odd sphinx
#

also

#

u cant a.b that

jovial island
odd sphinx
#

thats a dictionary bro.

#

a['b] bro.

dusky cliff
#

js habits amirite

jovial island
#

yeah old habits we get the point

odd sphinx
#

ikr

#

yes

jovial island
#

python sure is weird stuff

undone root
wide totem
#

Hello inconsistent unit time

undone root
#

hello time unit inconsistent

jovial island
undone root
#

and to offend that i do not like something i will try to create a problem
sorry, i don't get what this means

jovial island
#

alright makes sense.

undone root
#

what danger noodle said

jovial island
#

i knew that solN i was curious about what else.

odd sphinx
#

ok javaer

round moss
#

how about

if cond:
    a={'b':3}
else:
    a={}
jovial island
#

anyways thanks alot @dusky cliff @odd sphinx @tranquil ridge @thorn dragon
i dunno why but this seems weird to me, scoping is simple to understand(atleast to me) and kinda more better IMO

jovial island
undone root
#

why not

a = {'b': 3} if cond else {}
round moss
#

because long expressions suck more than typing a variable name twice

undone root
#

disagree, but it's a matter of preference

odd sphinx
#

or ```py
a = {}
if cond: a['b'] = 3

#

πŸ‘

undone root
jovial island
jovial island
#

i even sometimes just create variable for conditions if they are ugly
i mean for me

eh = .......................
if eh:
  # do stuff

is better than

if ..................:
  # do stuff
undone root
#

interesting preference

jovial island
#

or may be function for re usability if needed

round moss
#

sometimes, it does make sense to name an if condition

jovial island
#

indeed

#

yeah i do cursed stuff sometimes in c. im trying to leave those days now.

#

i now give more weight to readability

#

its alright for me to have 10 more lines if its easier to read.

odd sphinx
odd sphinx
#

@sweet meteor the theme on my windows terminal is called material ocean

sweet meteor
#

gonna try that out

real forum
#

Wait you can set windows cmnd themes?

wide totem
#

yes

lapis yacht
odd sphinx
#

no

wide totem
#

no

odd sphinx
#

windows terminal

#

themes

#

just get one

#

ez

wide totem
lapis yacht
#

Oh

odd sphinx
#

ye

#

but mine is better

#

B)

lapis yacht
real forum
odd sphinx
#

nice

wide totem
#

i have windows terminal preview because I'm not a "" user

sweet meteor
wide totem
sweet meteor
#

ooh, cool

#

if i ever stop using wsl im gonna try that

wide totem
#

unless, a software does not have a beta program

lapis yacht
wide totem
#

how do the workers work for github webhook filtering?

#

i assume they work just like a discord url, but how is it configured?

grim seal
#

1sec

grim seal
#

is_noisy() is based on a bunch of factors

#

this is the full logic which condenses down into a single boolean on the last line

#

and then if shouldIgnore is false, it calls the github webhook endpoint of the discord api

#

and then all that combined returns either a 203 (Non-Authoritative Information) or a 204 (No Content), former meaning it was ignored, latter meaning it ended up at Discord

#

I have some charts of the events passing through actually

#

hmmm

#

also by the types of events that come from GitHub

wide totem
grim seal
wide totem
#

Every worker also triggers that worker?

grim seal
#

no, that's a library that is used in the github worker

wide totem
#

Ah

pastel nest
#

what is this name's meaning-

languid osprey
#

.randomcase aren't you a core dev

cerulean panther
#

don't

rigid echo
#

Hoiio

cerulean panther
jovial island
#

Sup pythoneers

cerulean panther
jovial island
#

whatcha doin

cerulean panther
jovial island
#

what is the meaning of ur discord username

cerulean panther
#

its reversed

jovial island
#

oh

#

which language is it

cerulean panther
jovial island
#

what are those weird symbols lol

cerulean panther
#

cats

jovial island
#

cats?

cerulean panther
#

yep

jovial island
#

how are those cats

cerulean panther
lapis yacht
grim seal
whole condor
#

?

#

what's that

grim seal
#

my network graphs

#

I'm proxying all my traffic through a London server, so figured I'd set up some nice metrics while I'm at it

whole condor
#

i can't see them

#

not even if i zoom to the max

grim seal
#

I can zoom in browser and it works

whole condor
#

this is what i see if i try to zoom

grim seal
#

weird

#

that top one is probably the most boring – it's just listing how many networks I have visibility into

unreal sigil
#

I see them fine when I open in browser

pastel nest
cedar turtle
#

hmm

cedar turtle
#
lambda s: ''.join([str.lower, str.upper][randint(0,1)](x) for x in s)
pastel nest
pastel nest
cedar turtle
#

another challenge

#

get input from user, and print Palindrome if string is palindrome else Not Palindrome

pastel nest
#

i still think this can be shortened... but how

cedar turtle
#

i already a solution

#

lets see if you can beat it

pastel nest
#

lambda s: "palindrome" if s[::-1] == s else "not palindrome" tested, works

cedar turtle
pastel nest
cedar turtle
dusky cliff
#

print("not"*(i:=input())!=i[::-1],"palindrome")

cedar turtle
#
print(['Not Palindrome','Palindrome'][(s:=input())==s[::-1]])
``` this was my sol
pastel nest
cedar turtle
dusky cliff
#

it might be != or ==, too lazy to confirm

cedar turtle
hazy laurel
#

lack of spaces hurts

pastel nest
cedar turtle
hazy laurel
#

also

pastel nest
cedar turtle
#

can't resist the urge to golf every piece of code you write

hazy laurel
#

you should update your powershell :[

pastel nest
dusky cliff
pastel nest
#

gotta go now, got some work to do

cedar turtle
#

isn't that idle

hazy laurel
#

That's the Python interpreter in powershell

cedar turtle
hazy laurel
#

or... "repl" I think it's called

dusky cliff
#

nvm my soln missed a ()
print("not"*((i:=input())!=i[::-1]),"palindrome") works

hazy laurel
cedar turtle
hazy laurel
#

The blue is old PowerShell

#

new PowerShell has black

#

by default

cedar turtle
#

and super sure powershell doesnt have syntax highlighting

hazy laurel
#

IDLE has a white background tho

cedar turtle
#

its this theme

hazy laurel
#

wha

#

I don't remember IDLE looking like that

cedar turtle
#

idle has themes

hazy laurel
#

could swear it was white

cedar turtle
#

you can opt for that "dark" theme

hazy laurel
#

hm

cedar turtle
#

i use a custom theme in idle

odd sphinx
#

brug

hazy laurel
#

I just don't use IDLE

cedar turtle
#

even tho i don't use idle

hazy laurel
#

I just go into my terminal and go ipython

cedar turtle
#

yeah

#

ipython is kewl

dusky cliff
#

ipy \😎

hazy laurel
#

yeah, I had an alias to ipy lol

cedar turtle
dusky cliff
#
C:\Users>ipy
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]:
cedar turtle
#

you know

#

real men use exec on unsanitised input in production

hazy laurel
#
echo "alias ipy=ipython" >> ~/.zshrc

\😩

odd sphinx
#

k

upbeat sandal
#

@scarlet portal I'm pretty sure there isn't a single person employed as a Python instructor who can effectively teach OOP

#

All the people who know Python seem to teach it online for free or make YouTube videos πŸ€·πŸ»β€β™‚οΈ

scarlet portal
#

🀷🏻

uneven geyser
dusky cliff
#

burh

odd sphinx
#

lol

copper tartan
#

happy birthday, @tawdry ingot, and welcome back to the community!

#

I dedicate this otname in your honor

#

!otn a patient-birthday-gargoyle

clever salmonBOT
#

:ok_hand: Added patient-birthday-gargoyle to the names list.

dusky cliff
#

dang they really waited out the three years

#

impressive

copper tartan
#

our most patient member ever.

dusky cliff
copper tartan
#

for those of you missing context, here's the backstory:

sinful sun
#

this is the kind of commitment we need in our lives

copper tartan
#

why don't we all ping @tawdry ingot and welcome them back to the community?

#

<@&267630620367257601> assemble! πŸ€–

hot pulsar
#

@tawdry ingot

copper tartan
#

no no. you have to write a nice welcome message.

hot pulsar
#

welcome

copper tartan
#

haha

rapid zinc
#

@tawdry ingot o/ welcome back

reef kayak
#

πŸ‘‹ @tawdry ingot

idle comet
#

hey @tawdry ingot welcome back

dusky cliff
#

wonder what it would be like to come back to 200 pings

simple harness
#

Welcome @tawdry ingot o/

runic junco
#

@tawdry ingot py_strong

small pivot
#

Haha that's epic. Welcome @tawdry ingot !

mint lintel
#

welcome @tawdry ingot!

unreal sigil
#

@tawdry ingot py_strong the return of a king

keen burrow
#

Welcome @tawdry ingot and happy birthday!

gaunt jacinth
#

Jeez, hello staff, there’s a lot of you

still dust
#

@tawdry ingot πŸ₯³

round moss
#

welcome @tawdry ingotand welcome to the community.

normal quartz
#

@tawdry ingot welcome, happy birthday!

odd sphinx
#

gargoyle hasnt replied

idle comet
#

i do hope its the same person

dusky cliff
#

lol

odd sphinx
#

ur efforts are futile

compact dagger
#

@tawdry ingot foxxyWave

small pivot
#

Shh, I was thinking that too

delicate lion
#

welcome back to the pyquack community @tawdry ingot!

dusky cliff
#

nah its the same person

dawn shoal
#

@tawdry ingot πŸ‘‹

grim seal
#

Welcome, again πŸ˜„

peak fiber
#

lmao

dusky cliff
peak fiber
#

pretty god around here

odd sphinx
#

can someone tell me who gargoyle is

sturdy relic
copper tartan
#

I wouldn't set the ping mob on someone if I wasn't sure they were the same person.

gaunt jacinth
#

2 owners
4 admins
Loads of helpers
Wow I’d love to be @tawdry ingot (welcome back)

odd sphinx
#

wait fr?

round moss
#

context

solemn panther
#

Hey @tawdry ingot!

odd sphinx
#

OHH

#

i see now

median blade
#

woah

dusky cliff
odd sphinx
#

understood

sturdy relic
gaunt jacinth
#

Lmao

odd sphinx
#

gday @tawdry ingot

dusky cliff
#

holy

sturdy relic
#

and today is his birthday

odd sphinx
#

and happy birthday

#

bud

normal quartz
fluid haven
#

Welcom πŸ˜„

hidden kernel
#

welcome @tawdry ingot !

dusky cliff
#

happy birthday, and welcome @tawdry ingot

normal quartz
mint lintel
#

happy birthday beehappyloaf

pale crypt
#

Happy birthday @tawdry ingot

normal quartz
#

serious doubt

dusky cliff
#

πŸ‘€

odd sphinx
#

damn if only everyone wished me happy birthday like this πŸ˜”

gaunt jacinth
#

s ame

normal quartz
idle comet
#

pydis birthday calendar when?

odd sphinx
#

im just kidding

dusky cliff
#

just wish him now

sturdy relic
normal quartz
#

then we can all wish you happy birthday @odd sphinx

odd sphinx
#

alright

median blade
#

lmao

odd sphinx
#

its july 14

sturdy relic
#

at europycon

odd sphinx
#

better wish me then πŸ”«

jovial island
#

hbd zee!

odd sphinx
#

or there will be problems

gaunt jacinth
#

.bm 852212146208899073

normal quartz
gaunt jacinth
#

Lmao I plan on it @odd sphinx

odd sphinx
#

just realized its june

dusky cliff
idle comet
#

does !remind work with a date

hazy laurel
#

wow. it's 6/9

odd sphinx
#

lmao

sturdy relic