Jump to content

Any Good Websites with C++ or System Language?

BlackRayPlayer
1 hour ago, reniat said:

So your solution to writing professional modern webapps is "just don't"? Everything should just be a desktop app?

Let me rephrase: Many problems caused by the limitations of a web browser which is not an operating system can be solved by not misusing that web browser as an operating system. So: No, not everything - but a lot!

 

1 hour ago, reniat said:

the industry is shifting desktop application development towards a webdev stack

I am not "the industry". I usually do what paying customers expect - but if their only requirement is to solve a problem by writing a software, the web browser is not my preferred platform. Sometimes I have the choice.

 

1 hour ago, reniat said:

A lot of modern apps are being written with JS using things like Electron.

Introducing critical security problems because the underlying Chrome is hard to keep up-to-date - if at all. I am in no way interested in using any of those for said reason.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Dat Guy said:

I am not "the industry". I usually do what paying customers expect - but if their only requirement is to solve a problem by writing a software, the web browser is not my preferred platform. Sometimes I have the choice.

Well, if your client is willing to pay for a Windows, Mac, Linux, iOS and Android app and the need to hire 4 different dev teams then sure, go ahead. Yes, you'll be getting better performance. Question is though: is this improved performance worth it? Do users need it? Do they even notice at all? Maintenance is another issue when writing only native apps. It's way more effort to keep several apps uptodate as opposed to one web app with a few media queries. And bear in mind that modern browsers run sandboxed which is not the worst ideas for regular apps. You want more performance? Use WebAssembly and provide your browser bytecode. You can even write it in basically all your preferred languages. 

Use the quote function when answering! Mark people directly if you want an answer from them!

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, bowrilla said:

and the need to hire 4 different dev teams

If only there was a language that would be compatible with more than one operating system without having to write everything four times!

Oh, right: There are dozens of them. ?

 

Please try again.

 

edit:

Node.JS is already out for anything remotely serious:

 

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Dat Guy said:

If only there was a language that would be compatible with more than one operating system without having to write everything four times!

Oh, right: There are dozens of them. ?

 

Please try again.

Sure, because libraries and syscalls are the same on all systems …

Use the quote function when answering! Mark people directly if you want an answer from them!

Link to comment
Share on other sites

Link to post
Share on other sites

(Please note my addition above.)

 

Yes, there are languages with platform-independent libraries and cross-platform compilers, like C/C++ and Delphi and C# and Java (eww) and Lisp and Go and Rust and ...

What exactly required "4 dev teams" again?

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Dat Guy said:

(Please note my addition above.)

 

Yes, there are languages with platform-independent libraries and cross-platform compilers, like C/C++ and Delphi and C# and Java (eww) and Lisp and Go and Rust and ...

What exactly required "4 dev teams" again?

 

Sure, node.js has some issues and bugs. So has every single piece of code out there that reached a certain scale. There are Buddha knows how many bugs in all OS out there that'll make them crash or are open for attacks. The bug got fixed. And I'm with the dev team on this one: you shouldn't rely on your service running without a backup and a load balancer for weeks or even months. I know of too many services that get funny after a while and they need a reboot to free up resources. 

 

Considering your claims: Well … no. C# is being brought to other systems but it's mainly Windows only. You can use Xamarin to get your code to other platforms but it's not MS/Visual C# anymore because that is developed with .Net in mind and Xamarin ports it … which takes time. If you want to make apps for iOS and Android that match the look and feel of those platforms you still need platform specific code. Third party libraries have compatibility issues and graphic heavy stuff is basically out of the question.

 

Delphi – well in most parts of the worlds it's pretty dead.

 

Java is not a straight compiled language, it runs in a runtime enviroment so it's not native. And you make it sound as if you just use C or C++ and your app runs on all systems. That might be true for a program of hello world complexity but as soon as you have a gui it gets tricky – unless you want to use some libraries or frameworks like qt but those you already did dismiss before. And then there's the look and feel again. If you're ok with qt's look and are willing to make an exception from your "no third party libraries" rule then sure, it's an option. It has its very own issues again though. 

 

And are you really telling me that you'd trust a dev that claims to be an expert for iOS, Android, Windows, macOS and Linux development? An expert meaning really knowing a system, its architecture, system calls and so on? I wouldn't because that's hardly possible. You might find a dev who focused on cross platform solutions but he or she will surely struggle to get the best performance out of it. I'm not saying it's impossible but if performance is so utterly damn important than you surely don't want to compromise by making a choice solely based on cross platform compatibility. 

 

The thing is: you just don't like web technologies and are making an emotional decision you can't really back with hard facts. Nobody is denying that native apps have advantages but its more work to deploy your app on different systems and keeping them running. If performance is a number one priority then there's hardly a way around, I agree. If it itsn't since your logic is just not that resource hungry then you're wasting time and therefore money by not going the web technology route. If your clients are willing to pay the extra, good for you. I surely wouldn't if I didn't need to.

Use the quote function when answering! Mark people directly if you want an answer from them!

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, bowrilla said:

Nobody is denying that native apps have advantages but its more work to deploy your app on different systems and keeping them running.

And this is where your reply falls short: "Dead" Delphi (please stop implicitly judging a language's quality by the relative number of users) has exactly one button to deploy your "app" (when and why have applications become "apps"?) anywhere - and chances are it won't need any adjustments for new IDE versions anytime soon, now that Unicode support is stable.

 

3 minutes ago, bowrilla said:

And are you really telling me that you'd trust a dev that claims to be an expert for iOS, Android, Windows, macOS and Linux development?

That's why I brought up Delphi (and Lisp): You don't have to be an expert in any of those systems to write a good desktop (/mobile) application in them.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Dat Guy said:

And this is where your reply falls short: "Dead" Delphi (please stop implicitly judging a language's quality by the relative number of users) has exactly one button to deploy your "app" (when and why have applications become "apps"?) anywhere - and chances are it won't need any adjustments for new IDE versions anytime soon, now that Unicode support is stable.

 

That's why I brought up Delphi (and Lisp): You don't have to be an expert in any of those systems to write a good desktop (/mobile) application in them.

Delphi doesn't support macOS 64bit and only 64bit Linux systems. Delphi is like the niche of a niche. Don't get me wrong, I have nothing against it. I actually started serious coding by using Delphi back in the Borland days when I was like 12. I pushed it into things it wasn't intended to do (as in OpenGL 3d engines). The performance wasn't good especially because the Delphi tries to be the universal tool. Simpler things with less resource hunger are fine but pushing it gets you intro trouble. It's the same with web technologies: sure things like WebGL are fun and interesting to run in a browser but it won't give you Crisis in a browser (yet). If you want that kind of stuff you better choose a different tool. If you find a company that does work with Delphi: good for you. In most parts of the world it will be a very hard search though. Interesting enough: in Brazil the picture seems to be different. 

 

Edit: and Lisp takes 3rd party software for proper cross platform GUIs – like CAPI from LispWorks which isn't particularly cheap.

Use the quote function when answering! Mark people directly if you want an answer from them!

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, bowrilla said:

The performance wasn't good especially because the Delphi tries to be the universal tool.

One could argue that, coming back to the original topic from which we started, the performance of native Delphi applications is still less horrible than that of a sufficiently large "webapp"... :)

 

5 minutes ago, bowrilla said:

If you find a company that does work with Delphi: good for you. In most parts of the world it will be a very hard search though.

If that was everything that mattered to me, I'd use COBOL. A secure job and a high salary guaranteed! But it would not be fun.

It is always good to have more than one arrow in your quiver, just in case. I'm happy to see that we're not that far from each other.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Dat Guy said:

One could argue that, coming back to the original topic from which we started, the performance of native Delphi applications is still less horrible than that of a sufficiently large "webapp"... :)

You act as though all large webapps made with a modern tech stack are automatically slow. I can disprove that with a single example of a webapp that is performant, so i'll do that. Instagram is made completely with React and node.js from the bottom up. It currently has the 6th highest web internet traffic in the world. Yet I just went there and it felt responsive, snappy, and the page loads were barely noticable. Web performance comes primarily from the design, not the language it's written in. You need to stop thinking all languages that aren't C are unusably slow. Is C faster? Of course, and you wouldn't write some huge data crunching system in JS, but not everything is about nanosecond levels of performance. Everything has its time and place, and holding yourself to some ridiculous "My website needs to be 8ms faster on page loads because it just does" performance standard is only going to lead to bad code. It will lead to bad C code too, because premature optimization is the root of all evil in every language.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Dat Guy said:

One could argue that, coming back to the original topic from which we started, the performance of native Delphi applications is still less horrible than that of a sufficiently large "webapp"... :)

That's the thing. If the performance doesn't really matter because it's not a demanding task or because network connections are more critical then why bothering with native apps, compiling for different targets? A node.js app can make use of web workers so that's the next thing and finally… you can just deploy several Docker containers with node.js using web workers. Will give you enough performance for hundreds of thousands of calls. 

 

10 minutes ago, Dat Guy said:

If that was everything that mattered to me, I'd use COBOL. A secure job and a high salary guaranteed! But it would not be fun.

If you're an US citizen I'd suggest Fortran. You'll have a secure job at NASA for those Voyager probes. 

 

12 minutes ago, Dat Guy said:

is always good to have more than one arrow in your quiver, just in case. I'm happy to see that we're not that far from each other.

True and either C or C++ are fine choices for that. Probably better than all the C#, Objective-C or Swift you can think of.

Use the quote function when answering! Mark people directly if you want an answer from them!

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, reniat said:

-snip-

I also feel there's an assumption that interpreted languages are always run the same way the BASIC programs of old were: line by line. A lot of interpreted languages these days are precompiled to something else for performance reasons. Sure you incur a larger upfront cost, but once it's done, the performance is practically imperceptible to people.

 

And while people could argue choosing the language is a design issue, I'd argue it's more of an implementation detail.

Link to comment
Share on other sites

Link to post
Share on other sites

Speed is not a property of a language to begin with...anyone with half a brain can prove that.

Link to comment
Share on other sites

Link to post
Share on other sites

Implementation.

Interpretation requires a minimum of two operations in the interpreter per instruction of its input.  The first operation is interpretation, the second is execution.

Let P represent Python and C represent..well..C...

the default implementation of the python interpreter is written in C.  therefore the speed of a python program must be P >= 2C.

BUT, python and C are both Turing complete, so the converse is also possible:  writing a C interpreter in python.

Therefore the speed of C must be expressible as C >= 2P.

It is a paradox.


The only thing that has a speed is how much time it takes to execute an instruction on the processor.  It's the implementation of the language, the compiler or interpreter, not the language itself that possesses this attribute.  And again, because of Turing completeness, implementations are 100% interchangeable.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Dat Guy said:

Then why is Python so abhorrently slow?

Is it slower than other languages? Yes. Is it ABHORRENTLY slow? It depends on what your definition of "abhorrent" is, but no it's not unusably slow. Python is a tool in a toolbox, just like C. They serve different functions. Is it the go-to language for high performance computation? No of course not, but that's not what it's designed for. It's meant for anything from scripting to AI/scientific computing. Many python libraries are actually pre-compiled C anyway, so even if you are only writing python code, that doesn't mean 100% of your output is interpreted. This is one reason why python has such a huge backing in the scientific and data science world. It's easy to use, and you can import really well written high performance scientific libraries with GIGANTIC community support.

 

If it were as universally blasphemously slow as you seem to think, people doing data science wouldn't touch it. But it works, and works well enough that the industry has taken python and run with it to do amazing things. The alternative would be having a bunch of statisticians and physicists trying to write things in C. Have you seen C written by mathematicians? I have. It's nightmare fuel.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Yamoto42 said:

Implementation.

Interpretation requires a minimum of two operations in the interpreter per instruction of its input.  The first operation is interpretation, the second is execution.

Let P represent Python and C represent..well..C...

the default implementation of the python interpreter is written in C.  therefore the speed of a python program must be P >= 2C.

BUT, python and C are both Turing complete, so the converse is also possible:  writing a C interpreter in python.

Therefore the speed of C must be expressible as C >= 2P.

It is a paradox.


The only thing that has a speed is how much time it takes to execute an instruction on the processor.  It's the implementation of the language, the compiler or interpreter, not the language itself that possesses this attribute.  And again, because of Turing completeness, implementations are 100% interchangeable. 

We've been down this road before.

 

Yes, ultimately it comes down to the implementation but in many cases because the language puts certain demands on the implementation.

There is no enigma. C and C++ leave lots of things undefined, the implementer can do whatever he wants in those cases. It's called "undefined behavior". Many things can and do go wrong but the language does not try to define those situations so the implementation does not constantly have to test and check for them. It's up to the programmer to explicitly add that check if he wants it (and trade in speed for safety) or forego such checks if he is certain those situations cannot happen anyway.

 

If the language defines all these situations, such as python for example, then the implementation has to add all these extra safety nets, which come at a cost, whether the implementer wants to or not. The language demands it.

 

So yes, ultimately it's always down to the implementation, because the implementation is in the end the thing that does the actual work, but you cannot simply brush away the demands put on the implementation by the language.

 

It's like blaming the factory worker for working slow while overlooking that management tied the worker up in red tape.

 

(extra reading for those interested: https://blog.regehr.org/archives/213 )

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×