Goodbye OOP

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Goodbye OOP

Post by Tenaja »

Got+ was written in c.
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: Goodbye OOP

Post by tj1010 »

TI-994A wrote:
tj1010 wrote:That was all marketing for abstract languages like Python, .NET, and PHP etc..

All those really addressed was development overhead...
And this language is doing the same thing. It claims zero-cost abstraction, when in reality, that cost is being exacted in the form of huge executables.

Truly low-level languages don't fall victim to that.
The size of the PE/COFF means little outside map-space made by the NT loaders. In the case of Windows OS. A 2MB exe or dll can easily be more efficient than a 1.2KB one because of dynamic allocation and CPU timing and stack frame cleaning algorithms. Not to mention hardware and software cache optimization.

I only know about Rust because people famous for reverse engineering and security say it remedies a lot around memory corruption attacks and byte optimization.
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Goodbye OOP

Post by TI-994A »

tj1010 wrote:A 2MB exe or dll can easily be more efficient than a 1.2KB one ... it remedies a lot around memory corruption attacks and byte optimization.
Two thousand times bigger binaries for security and optimisation? :lol:
Last edited by TI-994A on Sun Jul 31, 2016 5:10 am, edited 1 time in total.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Goodbye OOP

Post by Lunasole »

TI-994A wrote: Twenty times bigger binaries for security and optimisation? :lol:

It uses some embedded runtime, like one that MS C++ compiler allows to add (to prevent several errors while app running, like buffer overflow).
But unlike MS or GCC stuff, that one is really bloated, also includes things like garbage collection and many other. So not strange if they made another .NET, but all runtime is packed to executable, instead of placing it to a system folders, lol.

Nothing new, that's old google concept of code sandboxing, another trend to make monkeys life easier.
At the beginning google write all it's scripts and servers on php, then they realized how it is slow and wastes electricity, were making attempts to translate php to C, then using other faster toys like python, but seems finally got tired and decided to create own php, which is compiled to native from the beginning ^^

None of the C coders I know found that "Go" tool for webmonkeys useful or migrated to it. They only saying It has few interesting things like deferred functions, but generally is useless.
But I'm afraid the google has enough resources to make it popupar, so soon we will see mouse drivers not of 50mb in size (there were jokes about it in 2006, now it is reality), but whole 500 ^^
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Goodbye OOP

Post by the.weavster »

Lunasole wrote:None of the C coders I know found that "Go" tool for webmonkeys useful or migrated to it. They only saying It has few interesting things like deferred functions, but generally is useless.
Some monkeys that do find Go useful:
Google
Dropbox
Soundcloud
Docker
BBC


And here's an interesting blog post on Rust.
To summarise: Monkeys will love it :wink:
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Goodbye OOP

Post by Lunasole »

the.weavster wrote:To summarise: Monkeys will love it :wink:
Surely they love ^^. Go is almost like php for them, but without performance and some other problems. It is hard to imagine that web-monkeys (even from google) can code something on languages with low abstraction like C, that's why they reinvented such hybrid of php and C to write all they doing and replace python and other such.

But well, enough from me talks about monkeys :3 I was talking about coders who writing in C, still only very few of them seeing Go or Rust as really possible alternative and that is good (but don't know how this may change in future).
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Goodbye OOP

Post by TI-994A »

Lunasole wrote:...not strange if they made another .NET, but all runtime is packed to executable, instead of placing it to a system folders...
Yes; all statically linked. I believe that it could also be dynamically linked, but that would only result in runtime dependencies; same bloat.

Hardly feels like a low-level powertool; the way PureBasic does.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: Goodbye OOP

Post by tj1010 »

File system size has nothing to do with runtime. One of my PB games is 2.76MB but averages over 8MB private memory at idle in background and I only procedural generate some strings and use them for a canvas based display with some embedded PNG.

I'd be willing to bet a Rust program is more efficient than the same program written in c++ by the average c++ coder, or NASM or FASM if you choose.
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Goodbye OOP

Post by TI-994A »

tj1010 wrote:File system size has nothing to do with runtime. One of my PB games is 2.76MB but averages over 8MB private memory at idle in background...
That's not what is meant by runtime. You're referring to memory footprint. The runtimes being referred to are the dependencies that are bundled with the executables, that are causing the bloat in the file sizes.
tj1010 wrote:I'd be willing to bet a Rust program is more efficient than the same program written in c++ by the average c++ coder...
That'll be a bet you'd lose. Through managed code, as with many other high-level languages, it might be able to reduce illegal operations and unstable processes. But unless it is equipped with an AI compiler that could understand the intentions of the coder, and then re-write that code efficiently, it's not going to be able to produce a more efficient program; just a safer one, at best. At the end of the day, the efficiency of any program would boil down to the code structure and coder practices. GIGO. :wink:

On the other hand, the development platform and compiler are responsible for the execution speed and file size of the resulting binaries.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Goodbye OOP

Post by the.weavster »

Mozilla's Servo (written in Rust) massively outperforms Gecko (written in C++).
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: Goodbye OOP

Post by tj1010 »

TI-994A wrote:
tj1010 wrote:File system size has nothing to do with runtime. One of my PB games is 2.76MB but averages over 8MB private memory at idle in background...
That's not what is meant by runtime. You're referring to memory footprint. The runtimes being referred to are the dependencies that are bundled with the executables, that are causing the bloat in the file sizes.
tj1010 wrote:I'd be willing to bet a Rust program is more efficient than the same program written in c++ by the average c++ coder...
That'll be a bet you'd lose. Through managed code, as with many other high-level languages, it might be able to reduce illegal operations and unstable processes. But unless it is equipped with an AI compiler that could understand the intentions of the coder, and then re-write that code efficiently, it's not going to be able to produce a more efficient program; just a safer one, at best. At the end of the day, the efficiency of any program would boil down to the code structure and coder practices. GIGO. :wink:

On the other hand, the development platform and compiler are responsible for the execution speed and file size of the resulting binaries.

All languages use lexical analysis to convert to byte code stack frames that use returns and jumps. There is no need for AI. This is where optimizations are implemented like short-jumps, type conversion etc.. Then you have things like CPU branch prediction etc..

I'd bet any day that the average C++ coder not only bails on most big projects do to language design bottlenecks, but also writes inefficient and vulnerable code.
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Goodbye OOP

Post by TI-994A »

tj1010 wrote:There is no need for AI.
The bit about the AI compiler was meant as a quip. We're not there, just yet. :lol:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Goodbye OOP

Post by Keya »

how about superoptimization introduced in 1987 by Alexia Massalin :) she also worked on GCC
https://en.wikipedia.org/wiki/Superoptimization

btw programmers are putting a lot of people out of jobs ... how long until programmers develop programs that put perhaps most programmers out of jobs?!? surely it's probably "only a hundred years or so" away? or will programming always be job-secure in that sense!? :)
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: Goodbye OOP

Post by tj1010 »

Keya wrote:how about superoptimization introduced in 1987 by Alexia Massalin :) she also worked on GCC
https://en.wikipedia.org/wiki/Superoptimization

btw programmers are putting a lot of people out of jobs ... how long until programmers develop programs that put perhaps most programmers out of jobs?!? surely it's probably "only a hundred years or so" away? or will programming always be job-secure in that sense!? :)

StackGuard and ProPolice have been implemented a long time and people are still finding vulnerable memory corruptions and exploiting them. The same goes for GCC optimizations and actual binary performance. What good is saving a couple bytes on the RETN of a stack frame if the coder has memory leaks?

Don't be scared of A.I. replacing humans any time soon. Just look at all the fail happening despite massive spending and talent around self-driving cars. I'd say centuries away before we even get semi-automated A.I. with an acceptable rate of failure. Self-driving cars and the bitmap pattern algorithms around that are far more simple than something like a functioning bipedal A.I. bot that can drive a car or cook food or clean a house. Quad-copter auto-correct algorithms have also hit a human-intelligence plateau. Self-teaching AI can go very deep in to context but is still limited to what human creators can comprehend if even that much.

Extremely specific A.I. for data science work very well though if you spend the time gathering back-data.
Post Reply