|
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
3. No sys-admin, networking, "how do I setup XYZ" questions. For those use the SysAdmin[^] or Hardware and Devices[^] forums.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
modified 16-Sep-19 9:31am.
|
|
|
|
|
Has anyone seen this?
Neutralinojs vs Electron vs Nw.js - see the results[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Isn't it a tiny uncharged part of an Italian?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: uncharged part of an Italian
It's entirely theoretical; Italians are fully-charged at all times.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I know less about that stuff than the back end of a donkey, but the numbers look impressive. I'm shocked that anyone doing this stuff cares about performance. Sometimes I think the worst thing that happened to our industry was the availability of MIPS, GBs, and TBs out the yin-yang.
|
|
|
|
|
I started programming when performance was highly valued, and resources were scarce. I still try to code as if both of those things were still in play.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Quote: I still try to code as if both of those things were still in play.
I believe they are more important than ever.
Strangely enough some (many?, most?) cannot get the correlation between poorly performing software and the cost of deploying said software to the cloud.
In my guesstimate 99% of the software that gets pushed at unsuspecting customers, consume more than 100 x (not %) the resources it should have done in an even remotely sane world.
Here is a silly python snippet, its only purpose is to burn CPU time:
from datetime import datetime
def AddUp(x):
if x > 0:
return AddUp(x - 1) + x
else:
return 0
def CallAddUp():
result = 0
for x in range(1000000):
result = result + AddUp(512)
return result
started = datetime.now()
result = CallAddUp()
finished = datetime.now()
duration = finished - started
seconds = duration.seconds + duration.microseconds/1E6
print("CallAddUp() returned ", result, " in ", seconds, " seconds")
Run the above, and you get:
CallAddUp() returned 131328000000 in 77.055948 seconds
Doing the same thing in C#
using System;
using System.Diagnostics;
namespace ScriptExample001a
{
class Program
{
static long AddUp(long x)
{
if (x > 0)
{
return x + AddUp(x - 1);
}
else
{
return 0;
}
}
static long CallAddUp()
{
long result = 0;
for (long i = 0; i < 1000000; ++i)
{
result += AddUp(1000);
}
return result;
}
static void Main(string[] args)
{
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
var resultValue = CallAddUp();
stopwatch.Stop();
var duration = stopwatch.Elapsed.TotalSeconds;
Console.Out.WriteLine("C# CallAddUp( ) returned {0} in {1} seconds", resultValue, duration);
}
}
}
Run the above, and you get
C# CallAddUp( ) returned 131328000000 in 1,2486408 seconds
And then in C++:
uint64_t AddUp( uint64_t x )
{
if ( x > 0 )
{
return AddUp( x - 1 ) + x;
}
else
{
return 0;
}
}
uint64_t CallAddUp( )
{
uint64_t result = 0;
for ( size_t i = 0; i < 1000000; ++i )
{
result += AddUp( 512 );
}
return result;
}
int main()
{
start = std::clock( );
resultValue = CallAddUp( );
duration = ( std::clock( ) - start ) / (double)CLOCKS_PER_SEC;
printf( "C++ CallAddUp( ) returned %llu in %f seconds\n", resultValue, duration );
}
Run the above, and you get:
C++ CallAddUp( ) returned 131328000000 in 0.000000 seconds
Hence, many (most?) computer scientist have embraced python as their language of choice for crunching numbers …
Never mind that they often store data in text files, and then push them around between a plethora of web-services, …, etc.
Espen Harlinn
Senior Architect - Ulriken Consulting AS
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
|
|
|
|
|
Espen Harlinn wrote: C++ CallAddUp( ) returned 131328000000 in 0.000000 seconds No time at all? Even with all the speed, you are still adding one million times, so I would expect at least 200 or 300 us elapsed in the whole execution.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Quote: No time at all?
Exactly
Nearly all of it gets computed at compile time
compiling with: /O2 /Ob2 /Oi /GS- /arch:AVX2
Espen Harlinn
Senior Architect - Ulriken Consulting AS
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
|
|
|
|
|
#realJSOP wrote: Has anyone seen this?
Hopefully I can unsee it.
Given I don't develop in Electron or Nw.js, and given that my concept of a cross-platform app is simply a web app, and given that they have a server involved, I'm not quite sure what the point is.
I mean, really:
<p>Hello World</p> , how can it take more bytes that the 18 bytes (I guess *2 for Unicode chars)?
Maybe it's a solution to some problem. Thankfully, it's not a problem I have.
|
|
|
|
|
Where do we put questions about Electron development?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
In Nuclear Physics? Next to proton, neutron and moron??
Ducks and hides on the way to get the coat
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
You are going to need more than your coat, once the J.S.O.P 3000 has been activated.
Just saying...

|
|
|
|
|
THAT finally explains why there are so many morons!
|
|
|
|
|
Not to forget the bozon, the clown particle.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I'm not positive that I know.
I hate to be negative about things, but in this case I'd be charged if I answered.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
The problem I'm having is that it's essentially a web site that runs on the desktop.
I'm not really sure how I feel about it because it's all javascript, and I freakin' hate javascript.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I can understand that.
If it quarks like a duck, it's probably a water fowl - and JS is particularly fowl.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
What sparked your interest? You finally got an electric car now? 
|
|
|
|
|
I'm toying with the idea of re-writing my reputionator app, and was thinking a cross-platform approach would be cool. However, after looking at the size of the disk footprint (over 50mb), i'm having 2nd thoughts.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
50Mb is nothing these days - it's only a 1.14m stack of floppy disks ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I think you mean 1.44MB.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Well, if you're going to go all new-fangled on me ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You can find some alternatives here: tools-for-building-cross-platform-desktop-apps-with-web-technologies[^]
What I have heard is that besides the large footprint, it is also very difficult to write good behaving applications in Electron, so I would not recommend it for any complex application unless you have a team of developers behind you that can solve all the issues.
|
|
|
|
|