#off-topic-lounge-text

1 messages ยท Page 4 of 1

buoyant kestrel
#

I know Willow

#

@merry ocean Home movie?

#

Yeah

#

Hey Rab

#

Well done

#

Well dooooone

#

I'm going to drag people up to VC1 so that this channel is free for its intended use

barren tusk
#

no mic

covert bluff
#

can i have access to stream in voice chat ?

primal bison
#

@pliant prairie what are u coding rn?

modern hazel
#

@atomic phoenix interesting

warped escarp
#

is he teaching dictionarys

restive flower
#

heylo @buoyant kestrel can I stream please?

buoyant kestrel
#

Neat

#

This is using numpy?

#

Why would you not make the data frame as a variable and work from it that way

#

Just to make it less cluttered

#

@atomic phoenix

#

YeahYep

#

I'm more saying because you're calling so many methods

#

Ah, okay

#

Looooooove their syntactic sugar for getting slices and indexes

#

@honest pasture Are you having a stroke

honest pasture
#

rtc con

buoyant kestrel
#

Oh fun. Close and reopen the client

#

Yep. The cost of using Pandas vs numpy. A lot of the optimizations and quality of life things that you have from the latter are kind of not applicable on the former

#

Yo @primal bison

primal bison
#

Fun fact: Makarouna = pasta in tunisian

buoyant kestrel
#

Huh, learn something new everyday

primal bison
#

Ahahahaha yes :B

#

loc a 3 times, and you'll have a shakira song

#

xD

restive flower
#

helo @buoyant kestrel so I wanna stream my current project that I am working on

buoyant kestrel
#

!stream 406382478102626314

timid fjordBOT
#

โœ… @restive flower can now stream until <t:1673282178:f>.

primal bison
#

There we have it :B

buoyant kestrel
#

Oh dude

#

Now I want a Java Monster

primal bison
#

Aahahahhahaha

restive flower
#

Awwww ๐Ÿฅบ thank you sir @buoyant kestrel

buoyant kestrel
#

They have a flavor called Loca Mocha

primal bison
#

I'm bored, you can't blame me

restive flower
#

heheh boiss got the perm , come visit my stall :3

buoyant kestrel
#

And now to wait for an uncertain amount of time hoping that tech support gets back to me on a different issue

#

Sadly it's not our MSP but a vendor

#

That would do it

#

Seriously with this damn program

#

You do you

#

@primal bison Yo

primal bison
#

A lot of people did

buoyant kestrel
#

Culmination of years of work by staff and server members alike

restive flower
#

My stream stopped :(

#

@buoyant kestrel

buoyant kestrel
#

!stream 406382478102626314

timid fjordBOT
#

โœ… @restive flower can now stream until <t:1673282620:f>.

buoyant kestrel
#

!source

timid fjordBOT
primal bison
#

!contribute

timid fjordBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
โ€ข Sir Lancebot - our fun, beginner-friendly bot
โ€ข Python - our utility & moderation bot
โ€ข Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
buoyant kestrel
#

Forgot we had that tag

primal bison
#

@primal bison have a read at that

primal bison
buoyant kestrel
#

Correct

primal bison
#

Yes, it is in python

restive flower
#

how much time and trust do I need to serve to become a trusted streamer sir? ๐Ÿฅบ

primal bison
#

You can see that in the github repository

restive flower
#

@buoyant kestrel

primal bison
#

It shows you the different languages used

buoyant kestrel
#

I don't have a hard quota or something

#

@primal bison Type in here so we're not interrupting the streamers

primal bison
restive flower
primal bison
#

What do you mean ?

buoyant kestrel
#

@primal bison And that's part of the learning experience. Seeing how other groups do their code and learning to adapt to a different structure.

primal bison
#

Hum

#

There's a couple of things happening there

#
  1. It's not that it it's "different", it's just that the bot isn't big enough
#

We use cogs, which is a way to categorize commands and group them together

#

Same context -> more understandable

#

I suggest reading the docs that discord py has

#

And the different examples

#

They will help you get started

buoyant kestrel
#

Well..... this will take a bit

#

Back in a bit

primal bison
#

I need to catch my carpooling friend, ciao !

buoyant kestrel
#

@primal bison Just imagining you chasing after them

primal bison
#

mslkdsmlkzsdmlkjsdmlkjsdf is my movement pattern

buoyant kestrel
#

They went right pasta you

primal bison
#

10/10

primal bison
timid fjordBOT
#

@primal bison :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     print(f"There was {pasta[-1]} {pasta[2:]}{pasta[0}} sign")
003 |                                                              ^
004 | SyntaxError: f-string: closing parenthesis '}' does not match opening parenthesis '['
primal bison
#

AAAAAAAAA

#

This ruined my joke xD

primal bison
#

xDDDDDD

#

You get the idea

buoyant kestrel
#

Yarp

restive flower
#

Yeah my mic is picking the bg song, I muted

buoyant kestrel
#

@atomic phoenix Have patience

#

I am listening and watching

#

Just doing multiple things

raw rock
#

i am sir

buoyant kestrel
#

It's not cheating to use the built in functionality that the library gives you

#

If anything it's encouraging good practice

#

Especially because pandas is built off of numpy

#

Back later, currently on hold with a vendor

raw rock
#

yeh

#

yus sir

raw rock
#

aight imma head out now ! it was nice exploring

radiant brook
#

is this even good?

gleaming fractal
#

g

fresh zodiac
visual monolith
#

hello anyone there i need help!!!

merry snow
stuck lion
#

@night lily cant speak, seems my role is messed up

cold sun
#

hello, can someone help me with a piece of code?

#
def vow(s):
    vowels = ['a', 'e', 'i', 'o', 'u']
    for char in s:
        if char in vowels:
            return char
        else:
            return 'No vowels'
        
user = input('Enter a string: ')

print(vow(user))
#

trying to make a function to get all the vowels from a string

sonic token
#

Hello

#

can somebody help me with this code

#
# PCA & CLustering

pca = PCA(2).fit_transform(df)
pca_data = pd.DataFrame(pca)

pca_data['cluster'] = cluster.KMeans().fit_predict(pca_data)

# Score
silhouette_score(pca_data, pca_data['cluster']) # 0.3979574879047732

#

How can i increase the score

#

my data is some 16*16 digits at tilted angles

fallen topaz
# cold sun ```py def vow(s): vowels = ['a', 'e', 'i', 'o', 'u'] for char in s: ...

You're returning in a for statement which ends, there are two ways to change this.
One, you can use a tmp variable:

def vow(s):
    vowels = ['a', 'e', 'i', 'o', 'u']
    _tmp = []
    for char in s:
        if char in vowels:
            _tmp.append(char)
    return ",".join(_tmp)

Or you can use a generator, but I'm sure this is more advanced than what you need so I'd recommend just doing the above...

If you want to learn about generators though:
https://wiki.python.org/moin/Generators

timid violet
#

wassup 4YT

analog arrow
timid violet
#

sup x10

#

how did that code go

#

@vivid tinsel what happend to the whole work for a bar thing

#

the code you were working on yesterday?

#

lmao

#

man not having a mic is hard

#

ps: i lost my prev account so i dont have voice perms yet on this alt

raw rock
#

you can get them in no time

#

though

#

if you wish to

timid violet
#

3 days left

#

who has time

#

~ css button is not being centered currently ~

raw rock
#

hola maro

echo heath
#

What are you making?

timid violet
#

yup deb 11

echo heath
#

Booting up my pc will disappear for a second

timid violet
#

sup AF

raw rock
#

hows starlink?

#

if anyone has tried it?

#

is it stable?

#

is it like better than the local providers

timid violet
#

deb 11 sucking

#

@atomic phoenix hit the tab key

echo heath
timid violet
#

yup

#

same thing in sublime

raw rock
#

is it?

#

the first one

#

which says its bad

#

nvmm prolly my interpretation skills are bad

timid violet
#

that made soo much sense

#

"All the ram in the universe"

#

Java is the best language tbf

#

prove me wrong

#

i would say a whole essay if i had my mic , but sadly i have to talk here

#

generally

#

unsigned is useless

#

static is important

fallen topaz
timid violet
#

yes

#

ofc it doesnt

#

so you are a fan of rust?

analog arrow
timid violet
#

my view should be standardized :)

fallen topaz
analog arrow
#

A generator being an iterable still makes the point/intent of my statement true then, no? =)

fallen topaz
analog arrow
#

I based mine off yours @fallen topaz

fallen topaz
#

Calls what

#

Wym the other end

echo heath
#

brb grabbing some breakfast

fallen topaz
#

Oh the backend of it

#

Alr had a nice chat gtg

#

Seeya all

timid violet
#

what does yeild do in python?

#

it should be for cuncurrency right?

#

well its for that in java

analog arrow
timid violet
#

ok same thing then

timid fjordBOT
#

@dull anvil :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello,
002 | World!
analog arrow
#

Why do you have the "Hey I'm new" icon @dull anvil ?

raw rock
#

aight imma head out ...ty for the streams:) ....byee

timid violet
#

man my internet is soo bad i cant even connect to stream

#

starlink

inland garden
#

import pandas as pd

Erstellen Sie zwei Series

s1 = pd.Series([1, 2, 3])
s2 = pd.Series([4, 5, 6])

Erstellen Sie einen DataFrame aus den Series

df = pd.DataFrame({'s1': s1, 's2': s2})

Geben Sie den DataFrame aus

print(df)

wide aurora
#

autobots

#

roll out

warped escarp
#

how world you do recursion

#

ok

#

i mean for a spicific value

#

like z

fresh sail
timid fjordBOT
#

@dull anvil :white_check_mark: Your 3.11 eval job has completed with return code 0.

1024
warped escarp
#

mandelbrot set

patent jay
#

take advantage of it being lawless!!

warped escarp
#

arn't they the same?

#

ok

patent jay
#

the ethics behind the creation of AI reminds me of this episode:

"uses their DNA to clone their conscious minds into his modded version of the video game their company makes and runs. This means that although they are living their normal daily lives outside of the game, unaware they've been cloned, inside the game they are fully aware of their existence and are trapped in Daly's sick power fantasy. All they know is that they woke up in Daly's game and haven't been able to escape. "
https://gamerant.com/black-mirror-star-trek-episode-ending/

wide aurora
carmine current
#

@pliant prairie if you add from __future__ import annotations you dont have to make your typehints strings

#

yeah

#

it makes it so all annotations are evaluated after everything else

tender tangle
fresh sail
tender tangle
#

A bottle dynamo or sidewall dynamo is a small electrical generator for bicycles employed to power a bicycle's lights. The traditional bottle dynamo (pictured) is not actually a dynamo at all (which creates DC power), but a low-power magneto that generates AC. Newer models can include a rectifier to create DC output to charge batteries for electr...

fresh sail
foggy olive
#

ple anyone tell that what we'll write in modify function

#

i have made a function

inland abyss
#

Series([4, 6], index=["a", "b"])

raw rock
#

maro's sarcasm

#

hits hard

#

๐Ÿ˜

cold lintel
#

Are you looking for df.set_index?

#

foodies.set_index('name')

cerulean lark
#

guys

#

btw

#

does anyone know the blank coding page

#

with green code

#

that people use to pretend they're coding but it actually doesn't do anything

raw rock
#

i wish you could be my tutor

#

so that i may talk no more bullshit

#

and work only on facts maro:{

buoyant kestrel
#

Sup

#

How's it going, what're we working on

#

@atomic phoenix Full of information, always open to share such knowledge

#

Wouldn't say blathering

#

Little bit from column A....

#

I am a master of bullshitting

#

Mobile is still unwieldy, and even on desktop, code blocks don't fit well in it

#

But I kept the built in text channel open in this channel and code/help so that if people are streaming they can use the built in

#

I personally just hate having the video windows open all the time, especially when I'm at work

#

Harder to justify for me

#

Fine, I'll hop to the other, jesus christ

#

I'll swap during stream

#

Just when it's not going on I prefer it here

#

Dude, if this DMS export crashes again I'm going to scream

#

I hate this program

#

SO much

#

Sup null

#

Grab food already

#

A river dirt cheese

#

'murican

#

I love how bouncy and flowing Italian is

#

Mother. Fucker.

#

Failed

#

AGAIN

#

Scorched earth

#

Doing it in 5 client chunks

tender tangle
buoyant kestrel
#
Exception:
-----------------------------------------------------------------------------------------
  2.1 Date   : Mon, 16 Jan 2023 11:39:40 -0600
  2.2 Address: 00E47CA9
  2.3 Module : DMSCore.bpl
  2.4 Type   : EDBISAMEngineError
  2.5 Message: DBISAM Engine Error # 11010 Table or backup file 'DATA03A' does not exist.
#

These are the bullshit errors I get to deal with

#

Best part? It's not consistent which backup file it says does or doesn't exist

#

Quite often it's different

#

HATE this program

tender tangle
#

get them to switch to PostgreSQL then

#

or MySQL

buoyant kestrel
#

I'm not making a bespoke solution

tender tangle
#

lol

buoyant kestrel
#

That's the dumbest way to do things, especially for an accounting firm

#

It's not practical

candid flower
#

POV: no one has streaming perms

buoyant kestrel
#

Hey Prop

#

Well

#

Maro is going to do Pandas here in a moment

#

Oh god

raw rock
#

lol..m sorry but this is funny

buoyant kestrel
#

Try

#

The GPU

#

In a different

#

Slot

#

@tender tangle Don't be shitty

#

@royal heart You're peaking your mic. Can you pull it back from your mouth just a bit

tender tangle
buoyant kestrel
#

And amperage

#

It needs to match or exceed

#

I know, but if it's under it'll misbehave

#

I know

#

Still better to know than to not

raw rock
#

๐Ÿ˜‚

buoyant kestrel
#

@tender tangle Stop interrupting him

tender tangle
#

but

#

this is stupid

buoyant kestrel
#

Why are you being this way right now?

tender tangle
#

hghefg

#

k fine

buoyant kestrel
#

@atomic phoenix When do you plan on starting

#

Who're we still waiting on?

#

@proper cobalt Sup

#

@royal heart We're going to be talking about the pandas library

proper cobalt
#

hello hello

buoyant kestrel
#

Data analysis

#

Pandas builds off of numpy

#

I will punch you

#

Squarely in the arm

tender tangle
#

better than the nuts

buoyant kestrel
#

Or dead leg

#

Either or

tender tangle
#

brb

buoyant kestrel
#

@royal heart Can you move your mic away from your mic? Or adjust your auto gain. Currently you're peaking your mic so a lot of what you're saying is being cut off

buoyant kestrel
#

Dude

#

I'm tired

#

I meant mouth

#

I wouldn't

#

You're using a Python wrapper around existing functions

#

To the user, it'd be no different if it was implemented in Python

#

So you're still programming and using the library in Python

proper cobalt
#

python itself is implemented in C

#

so are you using C

#

lol

buoyant kestrel
#

In the same way you wouldn't say "Oh I'm not writing or doing Python, I'm just making things for the bytecode interpreter"

raw rock
tender tangle
#

fair point

raw rock
#

:{

buoyant kestrel
#

I'm just writing electrical pulses

raw rock
#

everyone here looks so serious and on point:}

#

yeh

buoyant kestrel
#

Yep

#

Exactly

raw rock
#

the only person i like is @tender tangle

raw rock
#

i wish to meet you tho

#

:}

proper cobalt
#

ive got 12 cathode ray tubes here

raw rock
#

i mean i understand this channel is for studying

buoyant kestrel
#

Why?

raw rock
#

but lil fun does no m

#

harm*

buoyant kestrel
#

No no

#

To Anokhi

tender tangle
raw rock
#

which verboof does

tender tangle
#

I stab you with a cathode ray tube

proper cobalt
#

i dont got the money for these newfangled transistwhatchamadongers

buoyant kestrel
#

It's not an LCD screen, it's a series of tubes!

#

@atomic phoenix Ready if you are

#

@upper umbra ๐Ÿ‘‹

wide aurora
#

are we learning polars?

buoyant kestrel
#

Bears

flint echo
#

hi guys , changed accounts again (im speedro)

#

aka @high zephyr

sand valve
#

hi, just wondering how the live coding and this chat works?

buoyant kestrel
#

What do you mean?

flint echo
#

wassup griff

sand valve
#

if i had a coding question can i ask here?

flint echo
sand valve
#

thanks!

buoyant kestrel
#

Yeah, you can ask here in chat

#

Might have to migrate to a different chat or direct you to the help system, but no problem asking quick stuff

flat patio
#

Just got here, what's this ?

flint echo
#

emacs i presume

buoyant kestrel
flat patio
#

thank you

sand valve
#

so i want to count how many rows and columns a csv file contains. this is the code I have but i'm not sure how to proceed/why it's not working py refugee_data = pd.read_csv("refugees.csv", header=0) mydata = pd.read_csv( refugees_csv, optional args ) mydata.info() mydata.describe() mydata.value_counts()

flint echo
#

Hemlock do you approve of the contrast?

buoyant kestrel
#

Not defined enough for me personally

flint echo
#

yeah i know

#

i am thinking of implementing dark theme

#

but boy oh boy did i do a ton of copy pasting

#

context im a java developer

sand valve
buoyant kestrel
#

I think

#

Not overly familiar with Pandas, personally

#

If that's all you're needing to get without any extra frills

flint echo
#

lombok

sand valve
#

thanks! I think I figured it out! refugee_data = pd.read_csv("refugees.csv", header=0) refugee_data.info() refugee_data.describe() refugee_data.value_counts() this is what i used

buoyant kestrel
flint echo
#

C# would wish it had anything near JPA

buoyant kestrel
#

JPA?

#

Japan's Panicking Actors

flint echo
buoyant kestrel
#

Been too long since I've done Java, can you enlighten me?

buoyant kestrel
#

The image is super small

#

Can you link the article?

flint echo
#

now i know this is no wizardry

#

but lets say i would want to create a new column

buoyant kestrel
flint echo
#
studentsRepository.save(
new Student(
"ryan",
"speedro",
"contact"
)
)
flint echo
buoyant kestrel
#

Oh sure sure

flint echo
#

this makes no sense

buoyant kestrel
#

I wonder if Entity Framework Core is the alternative

flint echo
#

i saw this good video on the difference

buoyant kestrel
#

Ehhhhh

#

That's an Amazon implementation

#

I'm not saying that Java doesn't do it better

flint echo
#

that was the first picture that came on google idk

buoyant kestrel
#

Just wondering what C#'s native alternative is

#

Yeah, Entity seems to be the closest

flint echo
#

not bad

buoyant kestrel
flint echo
#

not bad

#
exec sp_executesql N'SET NOCOUNT ON;
INSERT INTO [Students] ( [FirstName], [LastName])
VALUES (@p0, @p1);
SELECT [StudentId]
FROM [Students]
WHERE @@ROWCOUNT = 1 AND [StudentId] = scope_identity();',N
'@p0 nvarchar(4000), @p1 nvarchar(4000) ',@p0=N'Bill',@p1=N'Gates'
go
#
using (var context = new SchoolContext())
{
    var std = new Student()
    {
        FirstName = "Bill",
        LastName = "Gates"
    };
    context.Students.Add(std);

    // or
    // context.Add<Student>(std);

    context.SaveChanges();
}
buoyant kestrel
#

That feels pretty clean to me

flint echo
#

not as clean as

buoyant kestrel
#

Oh sure sure, I like Java's decorators that you showed

flint echo
#

you know the worst thing about java

#

the documentation sucks

buoyant kestrel
#

Yeah, I'm pleased with Microsoft's dedication to their docs

#

Not quite Python level

#

But still

flint echo
#
public interface CrudRepository<T, ID> extends Repository<T, ID> {

  <S extends T> S save(S entity);      

  Optional<T> findById(ID primaryKey); 

  Iterable<T> findAll();               

  long count();                        

  void delete(T entity);               

  boolean existsById(ID primaryKey);   

  // โ€ฆ more functionality omitted.
}
#

this is generated by JPA

#

you can just type StudentsRepository.findAllByUsernameAndEmailOrPassword();

#

magic

buoyant kestrel
#

Fair enough

#

Jesus I can't type

flint echo
#

and the only think you need to do is implmenet

buoyant kestrel
flint echo
#
String findAllByUsernameAndEmailOrPassword(String username, String email, String password);
#

i have no clue how they managed to implement such a powerful thing

buoyant kestrel
#

That's such a cluster fuck to read

flint echo
#

noooo

buoyant kestrel
#

I think I'm just spoiled by snake_case

#

camelCase works for smaller things but huge chunks like that...

#

Sure, you're saving space on the underscores but that just feels gross

#

And this is just a general casing gripe, not specific to Java or any other

flint echo
#
  List<User> findByFirstnameEndsWith(String firstname);
#

how hard is it to read this

#

WITH A GOOD FONT

buoyant kestrel
#

That feels better

#

I'm probably just dumb, or it's my ADHD

flint echo
#

also sorting and pagination

buoyant kestrel
#

But like more than 5 words or so in camel case just kills me

flint echo
#
User findFirstByOrderByLastnameAsc();

User findTopByOrderByAgeDesc();

Page<User> queryFirst10ByLastname(String lastname, Pageable pageable);

Slice<User> findTop3ByLastname(String lastname, Pageable pageable);

List<User> findFirst10ByLastname(String lastname, Sort sort);

List<User> findTop10ByLastname(String lastname, Pageable pageable);
#

weeeeeeeeeeeeeeee

buoyant kestrel
#

And it does all of that based on the name?

flint echo
buoyant kestrel
#

If it does then that feels spooky

#

Variable names feel like they shouldn't dictate functionality, just readability

flint echo
#

i honestly cant find any thing explaning how it works

#

but i have never seen something work like this

#

its pure magic

buoyant kestrel
#

I hate magical

#

I want to at least have a vague idea what's going on

#

Especially if you start getting errors being vomited at you

flint echo
#

java errors โค๏ธ

#

gotta be the best errors

#

Meanwhile go: ERR

buoyant kestrel
#

You cannot tell me that you find Java errors easily readable compared to others

#

There's no way

#

I mean other than experience with them, obviously

flint echo
#

it has the best explanation

#

by miles

buoyant kestrel
#

Okay let's say divide by zero

#

!e

4/0
timid fjordBOT
#

@buoyant kestrel :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | ZeroDivisionError: division by zero
flint echo
#

na

flint echo
#

better by miles

buoyant kestrel
#

I think this is one we'll always disagree on

flint echo
#

ok let me say something we both will agree on

buoyant kestrel
#

Because I've used Intuit programs where it crashes and you have a traceback that is close to a hundred lines long

#

And it's not the top part that properly shows the issue

flint echo
#

java is arguably one of the most contributing factor to the rise of computers

#

especially the web

buoyant kestrel
#

No argument there

flint echo
#

python will never come close

buoyant kestrel
#

Never made the claim that it was or would

#

Different languages, different purposes

#

Right too, right job

flint echo
#

its about contribution

#

HotJar it self has contributed more than Pyton (IMHO)

buoyant kestrel
#

COBOL, I'd argue, spearheaded the use of coding in business, especially financial sector, miles more than Java

flint echo
#

banks aswell^

buoyant kestrel
#

Does that mean COBOL is better?

flint echo
#

Java wasnt as well recognized

#

im sure if it was, COBOL wouldn't have existed :) /j

buoyant kestrel
#

You're saying it would have been COBOL

#

Was gonna say

#

It came out like... 30 years after

flint echo
#

It would've been the better COBOL

buoyant kestrel
#

Wait

#

20ish years

#

COBOL is hella robust.

#

As fugly as it is, it works

flint echo
#

never used it

buoyant kestrel
#

I've attempted to

flint echo
#

wont make any argument

buoyant kestrel
#

This is more observation. While yes, we could say that COBOL is still there because "why change it", but if it didn't work, they wouldn't have kept it

flint echo
#

that literally went against what i was saying 10 seconds ago

#

ofc COBOL has contributed alot aswell

#

but i dont think as much as java

buoyant kestrel
#

Sure sure, more explaining my thoughts

flint echo
#

The reason why i say this is the interactivity Java gave to the web

#

with applets

buoyant kestrel
#

I would also argue C is higher up in the food chain

flint echo
#

ofc - no argument there - put C++ there aswell

buoyant kestrel
#

Looking at COBOL again, I don't hate the syntax

#

It's just getting a test environment up to play with it is a bitch

#

Have to emulate a mainframe setup

sand valve
#

Hi, I wanted to find the value of a specific column in a dataframe. I know this function .value_counts() but idk how to find the value of a specific column

#

i just used dataframe.value_counts()

buoyant kestrel
#

What do you mean specific column. Like all the values contained in all the rows for it?

flint echo
#

from my knowledge Sim cards runs on Java aswell

buoyant kestrel
#

Possible/probable

flint echo
#

it seems they have their own operating system developed with java

sand valve
flint echo
#

Java Card

buoyant kestrel
#

Odd that this pissing match even started since I never made the claim that Python is superior or more important to the history or pedigree of programming in general

flint echo
#

programming gets a very vague

#

that would be C

#

PHP is coded in C

#

but generally i would talk about Web

#

and no language comes as close to java

buoyant kestrel
#

Really?

#

JavaScript

flint echo
#

Java came before Javascript

#

and the primary thing was

buoyant kestrel
#

And?

flint echo
#

Java applets

#

Javascript never implemented anything like Java applets for you to say Java copied it from Javascript

#

Java applets really allowed interactivity

buoyant kestrel
flint echo
#

Javascript was built on top of that

#

and was the successor for sure

#

yk whats the most important thing in the web?

#

interactivity

buoyant kestrel
#

Other languages and implementations also had much more dominance in the web market

flint echo
#

who really took it into the main stream? java

buoyant kestrel
#

PHP, RubyOnRails, everything comes and goes

flint echo
#

argument made

#

Java applets were implemented in Netscape 2 and really changed interactivity (After HotJar)

buoyant kestrel
#

At the time, sure

sand valve
buoyant kestrel
#

And that time has come and gone

flint echo
#

Yes but Java is the foundation

#

Javascript is the successor

#

Java must have existed for Javascript to build futher on it

buoyant kestrel
#

No

flint echo
#

?

#

make an argument against it

#

i didnt mean that

buoyant kestrel
#

You're saying that programmers would have just sat on their hands and thought "Oh golly gee, we don't have any inspiration to make this better, guess it'll stay this way forever."?

#

That's absurd

flint echo
#

i meant built on top of the interactivity java provided

buoyant kestrel
#

What specific interactivity

#

JS was made for the sole purpose to have that kind of intractability

#

And it turned out to be a much more robust alternative

flint echo
#

but Java did it first, and Javascript did it way better.

#

but Java brought it into mainstream

buoyant kestrel
#

Why is this claim even being made?

flint echo
#

JavaScript was first introduced and deployed in the Netscape browser version 2.0B3 in December of 1995.

buoyant kestrel
flint echo
#

Hotjar had Java applets

#

and then Netscape

#

was like f you i will do it better

#

boom the web

buoyant kestrel
#

But the claim you're making is that JavaScript never would have evolved without Java

#

Which is silly

flint echo
#

yes - wouldnt have existed

buoyant kestrel
#

You're saying that at no point, someone wouldn't have implemented an interactive language

#

I feel like you're fucking with us at this point

flint echo
#

Created by Brendan Eich in 1995 in just 10 days for the Netscape Communications Corporation, JavaScript is a programming language that was inspired by several other languages, including Java. Since 1997, JavaScript has become a trademark of Oracle.

buoyant kestrel
#

Was it ActionScript before?

#

I can't remember the name

flint echo
#

wtf

buoyant kestrel
#

JavaScript had a different name prior

flint echo
#

ActionScript is an object-oriented programming language originally developed by Macromedia Inc. It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript, though it originally arose as a sibling, both being influenced by HyperTalk.

#

think its a different thing

buoyant kestrel
#

Thank you

#

Knew it was something script

flint echo
#
  1. Introduced in 2011, the second iteration of LiveScript can compile to JavaScript. It provides improved object-oriented programming options and allows users to develop expressive scripting without the need for boilerplate code.
#

i mean doesnt it transpile

buoyant kestrel
#

Neat

#

And technically we shouldn't be calling it JavaScript anymore

#

It's ECMAScript, right?

#

Something like that

flint echo
#

my brain currently

buoyant kestrel
#

Unrelated note, god damn it I hate Lacerte DMS

flint echo
#

man physics for 3 hours really makes my brain go brrrr

buoyant kestrel
#

@proper cobalt What part?

flint echo
#

well ima go guys

#

brain had too much for today

buoyant kestrel
#

I've never said I loved it

proper cobalt
#

value_counts result

#

for multiple series

buoyant kestrel
#

Oh right yea

flint echo
#

you said when it works ; it works perfectly

#

i recall this

buoyant kestrel
#

That didn't change

#

Weird mic drop

#

Legit thought he said parting goats

hallow warren
#

hey I need a little help but I can't post it in the apropriate channel

primal bison
#

def a():
x=100
pass
def b():
c =100
d =x+c
return d

buoyant kestrel
#

Only exists within that scope

#

Also, sup folks

primal bison
#

x = 100

def func()
    x = 200

print(x)
func()
print(x)
worthy token
#

what about it? ๐Ÿ˜„

#

So selecting from a list

#

fam[x:y] select from a list number from x to y, without y. ???

buoyant kestrel
#

!e

x = 100

def func():
    x = x + 1
    print(f"Inside of the function {x=}")

print(f"Before the function call {x=}")
func()
print(f"After the function call {x=}")
#

Oh for

timid fjordBOT
#

@buoyant kestrel :x: Your 3.11 eval job has completed with return code 1.

001 | Before the function call x=100
002 | Traceback (most recent call last):
003 |   File "<string>", line 8, in <module>
004 |   File "<string>", line 4, in func
005 | UnboundLocalError: cannot access local variable 'x' where it is not associated with a value
buoyant kestrel
#

Ah, fair point

primal bison
buoyant kestrel
#

We can't add anything to x within the function scope because it does not yet exist

#

Yep

#

So we have the one in the global scope. Sort of

#

If you're reading the value then it would work

#

But since you're wanting to overwrite that value, it doesn't

#

You'd have to either explicitly declare x in order to us it locally OR make it global

#

!e

x = 100

def func():
    x = 5
    print(f"Inside of the function {x=}")

print(f"Before the function call {x=}")
func()
print(f"After the function call {x=}")
timid fjordBOT
#

@buoyant kestrel :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Before the function call x=100
002 | Inside of the function x=5
003 | After the function call x=100
primal bison
#
x = 100

def func()
    global x
    x = 200

print(x)
func()
print(x)
buoyant kestrel
#

That'll behave the way you originally thought

#

Yep

#

It's more prone to errors if you aren't careful

#

A better solution would be....

floral aspen
#

your not using c

primal bison
#

Mr. hemlock can u help me with a error ?

buoyant kestrel
#

!e

x = 100

def ham(x):
  x += 1
  print(f"Inside of the function {x=}")
  return x

print(f"Before the function call {x=}")
x = ham(x)
print(f"After the function call {x=}")
timid fjordBOT
#

@buoyant kestrel :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Before the function call x=100
002 | Inside of the function x=101
003 | After the function call x=101
buoyant kestrel
#

Passing arguments and returning values is how you would normally handle things like this

primal bison
#

ok now

buoyant kestrel
#

So the b() function can only see within itself or outside of itself. It cannot see inside of other functions

#

If you want it to know, you have to pass it to it or declare it there

#

!e
So let's take your code and try the following:

def ham():
  pork = 100
  return pork

def beef(spam):
  eggs = 200
  bacon = spam + eggs
  return bacon

number = ham()
print(number)
new_number = beef(number)
print(new_number)
timid fjordBOT
#

@buoyant kestrel :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 100
002 | 300
buoyant kestrel
#

Oh derp

#

!e

def ham():
  pork = 100
  return pork

def beef(spam):
  eggs = 200
  bacon = spam + eggs
  return bacon

print(beef(ham()))
timid fjordBOT
#

@buoyant kestrel :white_check_mark: Your 3.11 eval job has completed with return code 0.

300
buoyant kestrel
#

But it's a bit messier

#

Thoughts, comments, questions?

primal bison
#

okokok

#

thanks buddy

buoyant kestrel
#

Happy to help

#

There's other little shorthand things you can do such as

def beef(spam):
  return 200 + spam
#

But it really just depends on your needs

#

Okay, now I'm back

#

Gonna migrate back up to VC0 since no one is really streaming at the moment

coarse frigate
#

Who can help me pls

raw rock
#

just a sec brb

flint echo
#

ahh css

#

my enemy

raw rock
#

but i guess a member needs your help

#

yeh i agree

timid violet
#
async def handler1(client, message):
    await message.forward("me")

def handler2(client, message):
    message.forward("me")
primal bison
#

yeah right i can write code here

timid violet
#

import asyncio

async def count():
    print("One")
    await asyncio.sleep(1)
    print("Two")

async def main():
    await asyncio.gather(count(), count(), count())

#

One
One
One
Two
Two
Two

primal bison
#

just a moment

raw rock
#

use this `

#

3 times

#

ig slick would be able to help

#

in this case

#

yeh

cold lintel
#

๐Ÿ‘€

#

Hey

#

Not bad, you?

alpine bridge
#

oh you are from europe?

#

poland is pretty cheap

#

malta?

#

for people from poland is even worse

#

rip

#

tik tok is just addictive

#

it is designed to do that

#

yeah but you don't earn much from tik tok

#

sooo some parties from poland say that Poland should leave UE

#

*EU

#

nice

#

nice proof for innocence

#

is anyone from vc even reading this? XD

#

wow I am surprised

#

i would love to talk with you but i don't have 50 message here

#

sooo it will take some time

cold lintel
#

๐Ÿ‘‹

alpine bridge
#

hi

#

I'm also from city that is quite tou

#

*touristic

#

thats kinda dull

raw rock
#

and more money

#

dont lie

#

:))

alpine bridge
#

math is not that bad

#

I'm studying computer science

#

oh I have done matura exam

#

what is your first language Leonardo?

#

I learned english the same way

#

no it's not

#

i have something similar too

#

you can talk about it without promoting it

alpine bridge
#

yeah

#

War had big impact on Poland

#

soo in Poland a lot of politic parties use war to gain some political approve

#

yeah

#

so in Poland there are some proEU parties and some proRussia parties

#

comunism is just stupid

#

Poland is great example

#

we have many

#

so many

#

under schools and other buildings

#

those shelters are from around 1930 something

#

but there are some new

#

In Poland there is huge problem with our privacy

obtuse nebula
alpine bridge
#

yeah

#

i cant talk

#

i would like

#

its kinda crazy

#

some people think they know better that everyone else

#

great

#

Dunning-Kruger effect?

#

possibly

#

yes

#

that was quick

tender tangle
#

gn

obtuse nebula
cosmic falcon
#

Terraform is an Infrastructure as Code tool. I use it at work using AWS. It's pretty cool ๐Ÿ™‚

obtuse nebula
#
Harvard Business Review

Itโ€™s widely believed that the most successful entrepreneurs are young. Bill Gates, Steve Jobs, and Mark Zuckerberg were in their early twenties when they launched what would become world-changing companies. Do these famous cases reflect a generalizable pattern? In fact, the average age of entrepreneurs at the time they founded their companies is...

cold sun
#

hey everyone

#

i need a little bit of help

#

i need to clear the output terminal in vscode

#

using the os package

#

so like import os

#

and def cls():

#

need to create a function called cls()

#

to clear terminal outsput

#

output*

indigo marlin
#

wtf

fallen topaz
lone hedge
#

can someone please explain super().init()

slate galleon
#

how do i do this?

lone hedge
#

Is that hw my g?

#

idk what all that stuff is when it says compile your code with xyz

#

but to get an average of three numbers I would use the input method

#

input ("prompt the user with anything you want")

slate galleon
#

yeah

lone hedge
#

and I would just do that three times and set each of the responses equal to a variable

#

and then add the three variables and divide by 3, set that equal to an output variable and then print output variable

#

could you please explain what they mean when they say "compile your code with g++ etc"

#

i'm honestly kinda new to python as well

slate galleon
#

yeah its hard

#

im doin c++

lone hedge
#

Yea idk how it would work in c++ I have a feeling its similar but idk

#

did you get it tho?

slate galleon
#

no๐Ÿ˜‚

#

coding makes me feel stupid

last acorn
#

@slate galleon


int main() {
    double num1, num2, num3;
    double average;

    std::cout << "Type the first number: ";
    std::cin >> num1;
    std::cout << "Type the second number: ";
    std::cin >> num2;
    std::cout << "Type the third number: ";
    std::cin >> num3;

    average = (num1 + num2 + num3) / 3;
    std::cout << "The average is: " << average << std::endl;

    return 0;
}```
exotic glacier
#

my code
from urllib.request import urlopen
from urllib.parse import quote_plus
from bs4 import BeautifulSoup
from selenium import webdriver
import time

baseUrl = 'https://www.instagram.com/explore/tags/'
plusUrl = input('๊ฒ€์ƒ‰ํ•  ํƒœ๊ทธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š” : ')
url = baseUrl + quote_plus(plusUrl)

driver = webdriver.Chrome()
driver.get(url)

time.sleep(3)

html = driver.page_source
soup = features=("html.parser")

insta = ('.v1Nh3.kIKUG._bz0w')

n = 1
for i in insta:
print('https://www.instagram.com' + i.a['href'])
imgUrl = i.select_one('.KL4Bh').img['src']
with urlopen(imgUrl) as f:
with open('./img/' + plusUrl + str(n) + '.png', '.jpg', 'wb') as h:
img = f.read()
h.write(img)
n += 1
print(imgUrl)
print()

driver.close()
error
print('https://www.instagram.com/' + i.a['href'])
^^^
AttributeError: 'str' object has no attribute 'a'
why error?
please give me new code PLEASE DM

night lily
timid fjordBOT
#

@night lily :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 | AttributeError: 'str' object has no attribute 'a'
night lily
#

!rule 5

timid fjordBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

night lily
#

Farcebook doesn't want you scraping stuff.

barren tusk
#

Damn

#

๐Ÿ‘python

#

๐Ÿ“ˆ

barren tusk
#

It also has to do with the trade war between china and the us

cold lintel
#

Yeah we can hear you ๐Ÿ‘

#

I'm guessing None?

#

That's usually the way they represent an empty linkedlist/tree on leetcode.

#

@atomic phoenix this

#

Btw, are you ok with back-seat coding? ๐Ÿ˜„

#

A dummy-node can be helpful. It kind of removes the empty list edge-case.

buoyant kestrel
#

Oh huh, didn't node that

barren tusk
#

Very true!

cold lintel
#

What's going on with your connection dropping? Is it a connectivity issue?

#

If you're interested, this is how I would do it: ||```py
class Solution:
def mergeTwoLists(self, list1, list2):
current = dummy = ListNode()
node1, node2 = list1, list2
while node1 and node2:
if node1.val <= node2.val:
current.next = node1
node1 = node1.next
else:
current.next = node2
node2 = node2.next
current = current.next
if node1:
current.next = node1
if node2:
current.next = node2
return dummy.next

#

brb

barren tusk
gleaming pivot
cold lintel
#

What are you guys looking at? ๐Ÿ‘€

#

Erm, assuming the two lists are already sorted.

#

Yeah it would, but this section then appends the remaining elements of whichever list was longer: ```py
if node1:
current.next = node1
if node2:
current.next = node2

#

Sorry, not necessarily the longer one.

#

But the one with items remaining.

#

Thanks ๐Ÿ˜„

#

It helps to draw a few pictures, like the one in the example.

#

It's just re-arranging the arrows essentially.

#

I think the lists can have different lengths.

#

But they are guaranteed to individually be sorted.

#

It's kind of weird, because we're modifying the lists in-place.

#

Yeah, in the real world ๐Ÿ˜„

#

Erm, maybe walk through an example with pen and paper.

#

Actually draw the list nodes out and the arrows between them.

#

The only way I can solve these kinds of problems is visualising them.

fallen topaz
#
class Solution(object):
    def mergeTwoLists(self, list1, list2=None):
        """
        :type list1: Optional[ListNode]
        :type list2: Optional[ListNode]
        :rtype: Optional[ListNode]
        """
        if list1 and list2:
            _list = list1
            [_list.append(x) for x in list2]
            _list.sort()
            return _list

        # Return either list if other is empty:
        elif list1:
            return list1
        elif list2:
            return list2
``` Before I realized it was listnode objects lol
cold lintel
#

Ah right ok.

#

You could write a method that iterates over the linked list:

#
def nodes(ll):
    while ll:
        yield ll
        ll = ll.next
#

Then do something like sorted(itertools.chain(nodes(list1), nodes(list2)))

#

But then you have to convert it back to a linked list. ยฏ_(ใƒ„)_/ยฏ

fallen topaz
#

return ListNode(_list)

cold lintel
#

Erm, try writing it: ```py
def iterable_to_ll(iterable):
...

#

You need to build up the structure of the linked list yeah.

#

Yep ๐Ÿ‘

#

A nice trick is to use a dummy-node.

#

Ah right yeah. I think this: py a = b = c is like doing: ```py
b = c
a = b

#

Not sure about the exact semantics.

fallen topaz
#
public void add(Object data, int index)
    // post: inserts the specified element at the specified position in this list.
    {
        Node temp = new Node(data);
        Node current = head;
        // crawl to the requested index or the last element in the list,
        // whichever comes first
        for(int i = 1; i < index && current.getNext() != null; i++)
        {
            current = current.getNext();
        }
        // set the new node's next-node reference to this node's next-node reference
        temp.setNext(current.getNext());
        // now set this node's next-node reference to the new node
        current.setNext(temp);
        listCount++;// increment the number of elements variable
    }
cold lintel
#

Actually, I know a website that might help you understand...

#

one sec.

#
#

Huge link sorry ๐Ÿ˜„

#

I think they encode all the code into the URL, to make the link permanent.

#

It's a bit hard to see what's going on sorry ๐Ÿค”

#

Yeah

#

Yeah exactly

#

Yep. Variables and attributes are all just references/pointers.

#

Erm, linked lists are kind of a special case of graphs I think.

#

One advantage is you can efficiently add/remove elements from either end of this list.

#

@opal gate ๐Ÿ‘‹

fallen topaz
#

list.pop(0)
list.pop(-1)

cold lintel
#

Yep, although lists in python are implemented as dynamic arrays. When you .pop(0), every element to the right has to be shifted over one place.

#

Yeap

#

collections.deque is a linked list.

#

Or "double-ended queue", because it's actually a doubly-linked list (links go in both directions).

#

Yep ๐Ÿ˜„

#

If you know about big-oh notation, pop(0) from a dynamic array is O(n), whereas removing the first element of a linked list is O(1)

#

Yep, it is, although it obviously requires slightly more memory to have links going both ways.

#

If you're coding in python though, that's probably not a huge issue.

#

Yeah

#

No worries

#

I've got to go cook dinner ๐Ÿ‘‹

#

Cya

fallen topaz
#

Mine actually doesn't work as it's a linked list of nodes which I didn't understand at the time of writing it. @cold lintel Helped me understand it, and his genuinely works.

cold lintel
#

Hey ๐Ÿ‘‹ Working on another coding exercise?

#

What is actually going on with your Discord?

#

Hey Mustafa ๐Ÿ‘€

#

@atomic phoenix Can we get to the bottom of what's causing your Discord client to crash? ๐Ÿ˜„

#

It must be annoying for you.

#

Erm, there isn't a priority queue in the standard library, but there's a heap implementation, which you can use to make a priority queue.

#

brb

#

Hey @calm bay wave_left

calm bay
#

oops

cold lintel
#

No worries. I'm not sure myself whether to talk in this channel or the integrated text channel.

cold lintel
#

heapq

calm bay
#

priority queue is an abstract data structure, a heap is an implementation of a priority queue

#

also there is a PriorityQueue class in standard library (wrapper over heapq)

cold lintel
#

Oh there is pithink

calm bay
#

!d queue.PriorityQueue

timid fjordBOT
#

class queue.PriorityQueue(maxsize=0)```
Constructor for a priority queue. *maxsize* is an integer that sets the upperbound limit on the number of items that can be placed in the queue. Insertion will block once this size has been reached, until queue items are consumed. If *maxsize* is less than or equal to zero, the queue size is infinite.

The lowest valued entries are retrieved first (the lowest valued entry is the one returned by `sorted(list(entries))[0]`). A typical pattern for entries is a tuple in the form: `(priority_number, data)`.

If the *data* elements are not comparable, the data can be wrapped in a class that ignores the data item and only compares the priority number:
cold lintel
cold lintel
calm bay
#

I'm not sure what you mean

#

there isn't a priority queue in the standard library, but there's a heap implementation, which you can use to make a priority queue
is kind of like saying
there isn't a list in the standard library, but there's a dynamic array implementation, which you can use to make a list

#

ADT defines the interface, not the implementation

#

heapq is a priorityqueue, it just doesn't have an object oriented API

cold lintel
cold lintel
#

What were you discussing earlier by the way? Sounded like logic (I heard the word "tautology" ๐Ÿ˜„ )

#

@atomic phoenix I wasn't paying full attention sorry.

calm bay
#

i don't remember but I feel like marlo just likes finding a reason to use such words

cold lintel
#

Ah no, with Mr. Focus.

calm bay
#

oh right, he was talking about first order logic stuff in his discrete math course

#

am I wrong though, would you not use the word tautology if you had a chance to

#

look me in the eyes and say it

cold lintel
#

@fallen topaz I'm going to be here for a while, so you can stream if you like.

#

!stream 559903350024568833

timid fjordBOT
#

โœ… @fallen topaz can now stream until <t:1674244053:f>.

cold lintel
#

Yep ๐Ÿ˜„

#

Just become a mod. EZ

calm bay
#

been asking hemlock for ages

#

can you even imagine me abusing my powers? it's unthinkable

cold lintel
#

I think the problem is right now we have about a billion moderators already.

calm bay
#

what's one more

cold lintel
#

ยฏ_(ใƒ„)_/ยฏ

calm bay
#

it's fine I don't have time for it anymore with work and stuff

#

would have been cool in the 11 month hiatus from work i had

cold lintel
#

So @atomic phoenix, did you understand the idea behind the code I posted?

#

You have the right idea to draw pictures of nodes with arrows between them.

#

That's how I visualise this kind of problem.

#

Btw, what's going on with your client crashing all the time?

#

Is it like an out-of-memory issue or something?

#

Hey @flat mural ๐Ÿ‘‹

flat mural
#

hello

cold lintel
#

Segfault pithink

#

Is it a standard client?

#

Oh, that's weird.

#

Are you on Ubuntu?

#

Just drop it in /opt and add an .application file.

#

Or .desktop or whatever ๐Ÿ˜„

#

Fair enough

#

I guess snap packages are nicely isolated.

#

Ah right. I haven't had any issues with Discord on Linux though pithink Maybe you could try installing a different version?

#

Hey @primal bison ๐Ÿ‘‹ Just chatting, and doing some coding exercises.

#

Erm, I'm not sure Maro, let me check...

#

Oh like context-free grammars?

#

Erm, probably. I've not developed something like that myself, but I'm sure there are libraries for it.

#

Nah you're not

#

It's based on tkinter. I know a pretty good tkinter tutorial.

#

Oh it is? :C

#

Yeah I think the best projects to work on are ones that people will actually use!

#

Hey Rabbit ๐Ÿ‘€

#

Yep

#

Adversarial crossword you_think_about_that

fallen topaz
#

nice emoji

cold lintel
#

:C

#

Ohh, writing a recursive-descent parser can be fun.

#

Ah nice

#

Bye Maro ๐Ÿ‘‹

#

Yeah that's pretty accurate. You start at the top an recursively break the sentence down to figure out the structure.

#

Backaus Naur Form

#

Sounds interesting

#

Sure

#

!stream 559903350024568833 20M

timid fjordBOT
#

โœ… @fallen topaz can now stream until <t:1674246931:f>.

cold lintel
#

Ah, parsing natural languages is fairly difficult.

#

At least, doing it in a way which is robust.

#

Bit small lemon_glass

#

There is such thing as a parser parser yeah ๐Ÿ˜„

#

Aka parser generator.

#

Ah interesting

barren tusk
#

๐Ÿ‘‹ Hello

cold lintel
#

Ah very nice ๐Ÿ˜„

#

Ohh the dragon book!

barren tusk
#

O Wow

cold lintel
#

Erm, live-coding, but whatever.

#

You could measure it in terms of the number of machine code instructions it compiles to ๐Ÿค”

#

Yeah, a major factor is cache performance.

#

mhm

#

Oh yeah, you should check out code golfing ๐Ÿ˜„

#

You have to solve problems with the smallest amount of code.

#

Yep ๐Ÿ‘

#

People have written languages specifically for golfing.

barren tusk
#

Does python compile to machine code?๐Ÿค”

cold lintel
#

Some solutions are extremely inventive.

cold lintel
#

Yeah but it's all in good fun ๐Ÿ˜„

#

Ah well it compiles to an intermediate byte-code representation.

#

Although the byte-code is specific to CPython.

#

Yeah there are a few others.

#

PyPy and Jython for example.

#

Jython is JVM python.

#

Erm, they behave pretty similarly, if your code is written in pure python.

#

Most code written for CPython will work fine when run with PyPy for example.

#

PyPy is much faster in some cases.

#

Note PyPy is different from PyPI (Python Package Index).

#

It's a just-in-time compiler.

barren tusk
#

There sites that allow you to convert java code to python

cold lintel
#

Yep ๐Ÿ‘€

barren tusk
#

it might use weird nested else and if statements instead of elif statements so it isn't going to be very efficient I assume

cold lintel
#

Yeah, list expressions are not a regular language unfortunately. You'd have to parse them.

#

Not sure what you mean sorry.

#

Ah right. Can words contain only latin letters and digits? pithink

#

[a-zA-Z][a-zA-Z0-9]*

#

Something like this?

#

Dude, I had to study this at university ๐Ÿ˜„

#

Writing out regular expressions by hand and converting them to equivalent finite state machines.

#

Ah right yep. You need to surround with word boundaries.

#

\b[a-zA-Z][a-zA-Z0-9]*\b

#

@fallen topaz this

#

I'm not sure on what the exact definition of \b is.

#

Ah nice.

#

You don't have any quotes in your test string pithink

#

Oh right

#

How are you going to handle nested quotes?