[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>Want to learn C/++ >Its just a slow way to write retarded

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 71
Thread images: 5

File: python.png (80KB, 1000x1000px) Image search: [Google]
python.png
80KB, 1000x1000px
>Want to learn C/++
>Its just a slow way to write retarded code that runs marginally faster.

Python + numpy for life
>>
>marginally
>>
>Marginally
C/++ are A LOT faster than Python.
Whether you need that speed depends on what you're doing with the language
>>
>>59999339
>python + numpy

Sure, if you're just going to do math easily parallelizable using tensors, numpy is often the right answer.

But if you think that's the only possible use case for C++ you are retarded.
>>
If your Python scripts run comparably fast to c/c++ code, then your scripts don't do anything significant. Try building an OS in Python and let me know how it performs...
>>
>>59999339
> numpy
> Python is all you need
Try again, Mr. CS101, you failed.

Look up numpy.
>>
>>60001990

>Try building an OS in Python
How about JS?
https://node-os.com/
>>
File: uno1.gif (498KB, 500x400px) Image search: [Google]
uno1.gif
498KB, 500x400px
>>60002830
It's absolutely revolting, but I want to try it for shits and/or giggles
>>
>>60001990
You'd need to write an OS that supports Python runtime before you can write an OS in Python :)

>>60002830
>node-os is a full operating system built _on top of the linux kernel_
wew lad
>>
To me python is for getting shit done, I can whip up the required code in minutes and let it grind away while I do something else.
>>
>>60002901
>shiggles
>>
>>60002957

Python is good for little scripts of a thousand lines or less, but I wouldn't want to use it for anything bigger.
>>
File: 1487482863541.gif (18KB, 552x597px) Image search: [Google]
1487482863541.gif
18KB, 552x597px
>>59999339
>marginally faster
Well, when you write a --
>than python
>>
>>60002957
>>60003628
yeah, this.
honestly, both C++ and Python have their own uses, I use them both, I like C++ more, but I use Python more often. Both are comfy in their own ways
>>
Python is written in C. If you want to go fast, go write some C code in Python or better yet just compile a C program.
>>
>>60003855

C++ is often too much work for what you're doing, you generally only want to use it in cases where performance is critical.
>>
>>60002830
I'd just like to interject for a moment. What you're referring to as NodeOS, is in fact, NodeOS/Linux, or as I've recently taken to calling it, NodeOS plus Linux. NodeOS is not an OS unto itself, but rather another botnet component of a fully functioning Linux system made useful by the Linux kernel and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the Linux kernel every day, without realizing it. Through a peculiar turn of events, the botnet which you are shilling is often called "NodeOS", and many of its users are not aware that it is basically the Linux kernel, developed by the Linux Foundatiom. There really is a NodeOS, and these people are shilling it, but it is just a part of the system they use. NodeOS is the operating system: the program in the system that lets you run your programmes. The userspace is an essential part of an operating system, but useless by itself; it can only function in the presence of a kernel. NodeOS is normally used in combination with the Linux kernel: the whole system is basically Linux with NodeOS added, or NodeOS/Linux. All the so-called "NodeOS" distributions are really distributions of NodeOS/Linux.
>>
>>60002830
So it's Loonix but /bin/sh is a symlink to javascript interpreter?
>>
>>60001990
How about Common Lisp?
https://github.com/froggey/Mezzano
>>
>>59999339

#include <iostream>
#include <Eigen/Dense>
using Eigen::MatrixXd;
int main()
{
MatrixXd m(2,2);
m(0,0) = 3;
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
std::cout << m << std::endl;
}


> retarded code
>>
>>60000000
>>
>>59999339
I benchmarked finding all the prime's under 2,000,000,000 on python and C++ once. Iirc it was C++ 24s Python 2100s~. "marginally faster". Granted I might have just colossally fucked up the Python optimization but I really don't see how I could have raised the time roughly 100x, even if I am shit at programming.
>>
>>59999339
>Python bahbee tries C++.
>The Post

>>60007340
Python is slow except for those cases where Python is doing little work and the data is being handled by Python library functions written in C/C++.

PyPy is better but by no means high performing.
>>
File: hypocrisy.jpg (107KB, 500x281px) Image search: [Google]
hypocrisy.jpg
107KB, 500x281px
>>59999339
ok
>>
>>60007494
this
it also won't magically become faster using cython
>>
>>59999339
kys faggot. I did python. Switched to C; 1000x faster.
>>
>>60003855
This. High level languages like Python are super useful for whipping up a small script and getting something done.

Anything large needs to be C/Java etc. in order for it to perform well.
>>
>>59999999
>>
>>60008066
60000000 is gone, too, don't bother.
>>
>>59999339
Python is designed to be fast to write for situations that aren't performance critical. It's all about reducing the cost of development, but it's not a magic bullet.

For example, it would be unwise to write real time audio processor in python because you don't have very strict guarantees about where it allocates/frees memory and the performance overhead would make it unsuitable for subroutines that may need to run many thousands of times per second. Much the same could be said for writing anything else that requires a lot of performance, like writing a device driver.

Quite often the advantages of both are leveraged by integrating python scripting into a program written in C/C++. A good example is the frostbite game engine; performance critical parts of the engine are written in C++ with bindings to python provided to reduce development costs.

This isn't to say python is a bad language, because time spent in development is a serious constraint on any piece of software. A potentially slower bit of software is better than software that isn't released.

tldr:
While using python generally means faster development, it can be impractical (sometimes verging on impossible) to implement some tasks.

/thread
>>
>>60008378
Those are /b/-tier gets. The only gets that matter on /g/ are a series of 1s & 0s or 133333337.
>>
Python is great for writing huge things, idk what the fuck y'all are talking about.

It was originally spec'd out as a "glue" language in many different scientific computing circles. Many early adopters of python in the scientific community were in NOAA. They used to to glue together tons of shitty fortran.

And then, guess what? They often rewrote the performance-critical parts in numpy or cython instead of linking directly to the c/fortran-extensions. Now that shit is **all** python. But, it's still architected like a set of packages linked together, meaning there is incredibly weak coupling revolving around basic array passing. THAT'S the critical part.

I think the issue is that python developers/designers are afraid of the R-style paradigm, where literally every algorithm has its own package and unique datastructure. Instead, we make xbox-hueg packages like scikit & pandas. Pandas was so bloated in purpose at one point that they were actively developing shit for time series modeling & panel regression. Seriously what the fuck.

All you saying that developing big systems in python is hard/a bad idea are thinking like people who don't understand computer architecture. The issue isn't python, but it's the drive to make monolithic packages that do everything themselves. That, in python, is a clusterfuck just like it is in most other architectures.
>>
even pandas's name comes from panel data analysis. Like... it's current purpose is totally not what it started out being: an all-purpose sawzall for people with panel data.

Instead, it became pydataframes.
>>
File: 1298233036282.jpg (488KB, 565x800px) Image search: [Google]
1298233036282.jpg
488KB, 565x800px
>>59999339
python interfacing with fortran for computation (and C for OS stuff) master race
>>
>>60007340
>Granted I might have just colossally fucked up the Python optimization

You probably didn't even try - if you were solving this with a bunch of nested loops, you were doing it wrong.

OP's right. For most scientific applications, some vectorised array operations is all you'll ever need. The rest is done in Scipy.

I'd rather have my code run 2x longer but be able to do all the fancy shit (pyplot, ipython embed for fancy debugging, ..). I wish I had the time to re-write our main scientific code in Python, sadly I'm stuck with Fortran. Such is life.
>>
>>60008567
UNIX: The programming language.
Coming this summer.
>>
>>59999363
thats why python uses c modules at performance chokepoints. Best of both world.
>>
>>60001990

Try building an OS in Python and not lose your sanity.

Like, even if you had a computer that could run it with acceptable performance, you'd still want to fucking shoot yourself in the head trying to keep things straight.

Python is not good for anything more than scripting and "light" back end work.
>>
>>60008567
>tfw encapsulation is enforced by convention

Big systems require either a language that restricts you from doing stupid shit and manage the stupid shit you've already done, or incredibly disciplined programmers. Python does not help with that, and leaves it up to programmer discipline.

Sure, Python can be used to write big systems. So can any turing complete language. But usually there's the right tool for the job. Python is not the right tool for big systems.
>>
>>60008958
>Best of both world.
More like worst of both worlds.
Have fun marrying two fundamentally different languages from which one is 8 bit microprocessor tier system programming language to a vague, overall too dynamic, managed scripting language with two different approaches that both are major bottlenecks as soon as you want fine grained interaction and which kills anything somewhat remotely serious realtime.

Instead of using a somewhat modern, seriously implemented programming language that would be the right tool for the job.
>>
>>60009161
>Instead of using a somewhat modern, seriously implemented programming language that would be the right tool for the job.

What would you recommend generally that isn't Java, C#, or C++?

Would you consider C++11/14 for general use?
>>
>>60008567
About one half of that text is wrong, the other half is besides the point. Because

a scientific software is mostly throwaway garbage
b the semantical problems numpy/PyPy/Cython can at best hope to solve is numeric crap that isn't interesting for actual software

>>60009203
Java and C# would be a good start, however, there's always golang and dlang and swift and other crap and spinning crystals and whatever... If you're a so called number scientist you might as well use Julia.

>Would you consider C++11/14 for general use?
Not without good reasons. Like, say, I was about to use Qt or use opencv in a way beyond applying three premade algorithms.
>>
>>60009264
Would you say Go is ready to specialize in? I've been using Erlang for my own projects, but that'll be shit for jobs until I can get 10+ years industry experience.

> RE: C++ for general use
I've been dabbling around with implementing a game engine in it for shits and giggles, and was actually impressed. I don't feel like there was too much overhead compared to Java/C#, and where that overhead does exist, it's usually in making sure I'm doing things right the first time -- I've noticed I end up making things with a plan instead of Java/C# where I'd often just continuously refactor to make things fit into where I'm going.

I've been wanting to find a niche for myself, particularly language wise, and one I'll get a job in, but C#/Java don't appeal to me, nor does the typical software written in it (and likewise, a lot of the popular dynamic/scripting languages don't interest me), but I also need one that's sane to do my personal projects in.
>>
>>60009358
>Would you say Go is ready to specialize in?
Unless you work on container stuff, no.
Also, don't specialize on programming languages.
>>
>>60009400
>Also, don't specialize on programming languages.
If only HR and hiring managers understood that.
>>
>>60009491
The good ones do. For example, all those stories about gramps getting hired for COBOL dev?
They don't get hired for that, because everybody and his ballsack could learn COBOL in a couple of days.
They get hired for their knowledge about banking software, mainframes, fintech and similar domains.
>>
>marginally
I don't think there's actually a language in modern use that's slower than Python.
>>
>>60009583
If you count XSLT processors in?
>>
>>60009565
I've talked to a few shops where the lead engineer wants to hire me, but HR refuses because of my lack of language-specific experience.
>>
>>60008567
>The issue isn't python
Pythons only benefit IS it's monolithic packages that do everything themselves.
It's memory manager is fucking worthless, it's arrays are baffling not simple arrays in half the versions, it's not properly backwards compatible between revisions, and even basic computational scripts are magnitudes slower than even Ruby counterparts.

It's a shit language through and through, it's only redeeming feature is the giant packages you seem to think are it's main problem.
>>
>>60009657
Sounds like shit jobs where you'd have to work with people that specialize on languages, to be honest.

>>60009663
basically, this
>>
>>59999339
>marginally
You mean astronomically, you fucking retard.
>>
>>60009727
Yup. But gotta get my foot in the door somehow. I don't have a 4 year degree and I can't afford one, ON TOP of living in a small midwest city that has no established tech culture.

I'd at least like earn my stripes doing work that interests me, but fuck, think I might just have to suck it up and pump out a few good C#/Java projects, suck it up, and get a job at an insurance company writing the most boring ass shit.
>>
>>60009823
>I'd at least like earn my stripes doing work that interests me, but fuck, think I might just have to suck it up and pump out a few good C#/Java projects, suck it up, and get a job at an insurance company writing the most boring ass shit.
Sad but probably true. Good luck, anon.
>>
>>60006689
I got nauseous reading this, fucking disgusting
>>
>>60006689
So.... bare metal emacs clone?
>>
>>60009161
Have your ever heard of SWIG?
>>
>>59999999
>>
>>60009947
Yes. And there is a reason nobody and their dog uses it.
And it doesn't solve the fact that bindings are a bottleneck.
>>
Data scientist is my official title at work. I haven't used anything other than R or Python since I graduated. The Anaconda suite is pretty spot on.
>>
>>60009983
>Data scientist
>>
>>59999339
>literally 100 times faster
>marginally

https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=python3&lang2=gpp
>>
>>60009995
And what's wrong with that?
>>
>>60010024
in an unconvincing voice: oh, nothing. It's a total legitimate job, like realtor or drug dealer
>>
>>59999339
>marginally
kek
>numpy
So you found a comfy machine learning job? Good for you anon.
>>
>>60002940
>>node-os is a full operating system built _on top of the linux kernel_
So it's not really an OS but simply some userspace shit.
>>
>>60010064
Makes well into six figures, already in line for a VP job, work 3 days a week, and I travel the world, but you know, it's not a real job. It's better to be something else in the IT realm. It's not like Google, Apple, the US government, or anyone else are hiring data scientist right now. I mean, it's not even a real job.
>>
>>59999339
Julia is better if you don't write low level code or need a lot library of C++.

C++ is better than rust if you like low level programming.
>>
>>60010167
>Makes well into six figures, already in line for a VP job, work 3 days a week, and I travel the world
I don't see how that differs from drug dealing.
Also
>It's not like a couple of meme companies are hiring data scientists right now.
>>
>>60010238
You sound disgruntled. Do you still live at home and are unemployed?
>>
>>60010276
nope and yes, but that is because my day has only 24 hours
Thread posts: 71
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.