[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Maintenance is complete! We got more disk space.
Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 23 KB, 1200x1200, c.png [View same] [iqdb] [saucenao] [google] [report]
71355260 No.71355260 [Reply] [Original] [archived.moe] [rbt]

>> No.71355269

I see

>> No.71355305
File: 600 KB, 956x539, 2019-03-21-194656_956x539_scrot.png [View same] [iqdb] [saucenao] [google] [report]

b-but anon, I am learning Python. Do I need to go all over again with C ?

>> No.71355314

people on /g/ shit on python a lot but never really explain why

>> No.71355322

basically because its slow when you want to do anything more than your 1 line hello world script
people use it for data science and shit because its easy to use, but it's still terribly inefficient

>> No.71355420

Wrong. You have two options: write shit in C, fast but takes more time to get working shit or write shit in Python: almost as fast as C because Numpy, numba, pandas etc all written in C, and you can get your shit done in minutes.

Pick your poison gentleman

>> No.71355437

this is simply an inane and retarded comment

>> No.71355448

python is like dropping a ball into a fucking pachinko

>> No.71355453

What if you take C and make a language and call it, say, C++? Still C, right?

>> No.71355504

Alright you masochists, give me your C program which can open 10 GB of CSV file with 10,000 column, 1,000,000 rows and does a spearman correlation among these.

My Python code written in a second is:
df = pd.read_csv(file.csv)
corr = df.corr()

Literally takes a second to compute the results too.

>> No.71355518

read >>71355322
>people use it for data science and shit because its easy to use, but it's still terribly inefficient
also you can do that in C with the stdlib and gain a ton of efficiency over your "pandas" library (which is inevitably bloat)

>> No.71355535

Show the code or shut up. Then compare performance.

>> No.71355545


>> No.71355562
File: 20 KB, 458x550, 1560162699.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.71355594

Jokes on you, all the data science parts are written in C.

Python is great as a scripting language for doing shit with files and strings, and as a wrapper around a BLAS and other compute heavy stuff written in C. Python sucks in a vacuum because it has some really fucking retarded design decisions that kill it's ability to do anything interesting that doesn't rely on separate C modules. For example, there are no primitive datatypes, everything is boxed including things like ints. That means if you have code that repeatedly modifies an int (like summing an array), the int won't end up in the cache, instead the box around it will, and each write to the int requires a pointer to be followed into main memory rather than just updating it locally. Another stupid decision is the global interpreter lock, which precludes any meaningful form of concurrency as only one thread can actually be in the interpreter at a time. Python is filled to the brim with shit like this where they sacrificed functionality and performance for ease of use in a way that poses a real problem to programmers looking to solve everyday problems.

>> No.71355603

>data science parts are written in C
I'm so tired of you jokesters implying that because you're using a C library you will get anywhere near the efficiency of plain C

>> No.71355624

You can use multiprocessing rather then multithreading to get rid of GIL though

>> No.71355674

Have you actually benchnarked it?
On my machine numpy matmul takes 8% longer than just calling the BLAS directly. Python is basically relegated to passing pointers around and 90% of the execution time is spent in compiled C.

True, but there is probably a way structure the interpreter to allow for normal multithreading but they chose not to do it and instead have people work around the GIL by starting multiple copies of the interpreter. That said I don't actually know a whole lot about the python interpreter, so maybe there is some compelling reason that I'm not aware of.

>> No.71355683

The only language you'll ever need.

>> No.71355722

Yeah you're right. Its basically an ancient decision by Guido fucker to have a single interpreter thread and they were too lazy to rewrite the whole thing to fix that. Idk why do they still suck his cock in 2019

>> No.71355798

You do know that you can use external libraries and wrappers in any language, right? It's not exclusive to Python.

>> No.71356159


That's a letter, not a language.

>> No.71356178

*if you are a nigger.

>> No.71356183


>> No.71356255
File: 40 KB, 600x485, retard.jpg [View same] [iqdb] [saucenao] [google] [report]

hee hee hoo hoo

>> No.71357522

say that to companies that use excel for everything

>> No.71357542

C set us back decades.

>> No.71358682
File: 111 KB, 1280x720, Sakura_Nene_CPP.jpg [View same] [iqdb] [saucenao] [google] [report]

no answer 5 hours later
poor Cniles are probably busy reinventing basic data structures for 1000th time just to answer this question

>> No.71358729

You appear to be missing a ++.

>> No.71358787

In a perfect world, yes. C is immaculate, but people are not. That is why other languages exist, because people suck at coding. Badly.

>> No.71359148

What? Are they retarded?

>> No.71359391

Needs destructors.

>> No.71359444
File: 36 KB, 1000x1000, anvil-claw-hammers-n-g16cav-64_1000.jpg [View same] [iqdb] [saucenao] [google] [report]

The only tool you'll ever need.

>> No.71360006

C got us out of the computational stone age. It was the first civilized language.

>> No.71360034

Retard, C set us back decades.

>> No.71360043

Fuck C. Lisp is life.

>> No.71360074

you have no fucking clue what you're talking about.

>> No.71360100

Without C we'd still be sorting punchcards to feed into relay machines the size of a bus.

>> No.71360134

Forth, Lisp and ML already existed prior to C.

>> No.71360169

And they were all dead ends. Even today they're going nowhere.

>> No.71360179

Today their evolution all the best options for their respective problem domains. This is why I say C set us back - it outright retarded progress.

>> No.71360210

Python first, that's great.
Then C.

>> No.71360844

how can i do web development using c?

>> No.71362313

>dead ends
Forth -> Interpress -> Postscript -> PDF
so everytime you read or print a PDF file, you are using a stack based programming language that had its ancient roots in FORTH.

>> No.71362371



>> No.71362399

how hard is it to develop a GUI in C?
total noob here.

>> No.71362496

Open sockets and serve your HTML, how else?

>> No.71362507

Depends, can be easy or hard depending on what you're using.

>> No.71362534
File: 66 KB, 756x651, file.png [View same] [iqdb] [saucenao] [google] [report]

for instance how hard is it to produce something similar?

>> No.71362710

Not too hard with certain libraries since it's just generic UI elements with different colours

>> No.71362710,1 [INTERNAL] 

GTK+ is probably the most well-known C GUI library.


has a list

>> No.71362710,2 [INTERNAL] 

go check out


>> No.71362710,3 [INTERNAL] 

RPG master race reporting in

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.