Want to learn C/++

>Want to learn C/++
>Its just a slow way to write retarded code that runs marginally faster.

Python + numpy for life

Other urls found in this thread:

node-os.com/
github.com/froggey/Mezzano
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=python3&lang2=gpp
twitter.com/NSFWRedditVideo

>marginally

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

>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...

> numpy
> Python is all you need
Try again, Mr. CS101, you failed.

Look up numpy.

>Try building an OS in Python
How about JS?
node-os.com/

It's absolutely revolting, but I want to try it for shits and/or giggles

You'd need to write an OS that supports Python runtime before you can write an OS in Python :)

>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.

>shiggles

Python is good for little scripts of a thousand lines or less, but I wouldn't want to use it for anything bigger.

>marginally faster
Well, when you write a --
>than python

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.

C++ is often too much work for what you're doing, you generally only want to use it in cases where performance is critical.

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.

So it's Loonix but /bin/sh is a symlink to javascript interpreter?

How about Common Lisp?
github.com/froggey/Mezzano

#include
#include
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

...

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.

>Python bahbee tries C++.
>The Post

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.

ok

this
it also won't magically become faster using cython

kys faggot. I did python. Switched to C; 1000x faster.

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.

...

60000000 is gone, too, don't bother.

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

Those are Sup Forums-tier gets. The only gets that matter on Sup Forums 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.

python interfacing with fortran for computation (and C for OS stuff) master race

>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.

UNIX: The programming language.
Coming this summer.

thats why python uses c modules at performance chokepoints. Best of both world.

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.

>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.

>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.

>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?

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

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.

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.

>Would you say Go is ready to specialize in?
Unless you work on container stuff, no.
Also, don't specialize on programming languages.

>Also, don't specialize on programming languages.
If only HR and hiring managers understood that.

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.

If you count XSLT processors in?

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.

>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.

Sounds like shit jobs where you'd have to work with people that specialize on languages, to be honest.

basically, this

>marginally
You mean astronomically, you fucking retard.

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.

>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, user.

I got nauseous reading this, fucking disgusting

So.... bare metal emacs clone?

Have your ever heard of SWIG?

...

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.

>Data scientist

>literally 100 times faster
>marginally

benchmarksgame.alioth.debian.org/u64q/compare.php?lang=python3&lang2=gpp

And what's wrong with that?

in an unconvincing voice: oh, nothing. It's a total legitimate job, like realtor or drug dealer

>marginally
kek
>numpy
So you found a comfy machine learning job? Good for you user.

>>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.

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.

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.

>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.

You sound disgruntled. Do you still live at home and are unemployed?

nope and yes, but that is because my day has only 24 hours