Lets translate all of the latest Slackware 64 bits stable version source code to Assembler. I'll join the project on July 1st...
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well I guess a cluster of quantum computers could translate much faster than a programmer.
FWIW if someone told me about modern android specs 20 years ago, I'd probably think they are mad.
To each their own, but it always got in the way when typing and just is a nuisance.
This! Either it was too fast/sensitive , or then suddenly too slow and a pain to get to a window - for me it is worse than the touchpad, and least with that I can navigate somewhat better, if I don't have a mouse on hand. That orange thing is just fscking useless imo.
I actually find it a great boon for typing exactly because of its location. I don't have to move my fingers from the home row on the keyboard to click something. Mouse is the worst regarding that because I have to completely remove my hand from the keyboard to move it. Touchpad is closer, but it's not as precise as mouse AND trackpoint.
Quote:
Originally Posted by bassmadrigal
This isn't exactly true. While the kernel does have tens of thousands of programmer years, you would not need to take all that time to translate the kernel to a new language. Many of the lines of code written in those thousands of years of coding have been removed/replaced/refactored, and you wouldn't need to recreate all the history of the kernel to get to a modern kernel.
We're still looking at an unfathomably long time to rewrite the kernel, but it would be at least an order of magnitude less than what it took to get to this point.
I believe the programmer years I quoted are actual for the current LoC count. And I doubt it would take less time to rewrite as a programmer must first read and understand the old code and only then write the new code.
Quote:
Originally Posted by elcore
Well I guess a cluster of quantum computers could translate much faster than a programmer.
Actually, any computer could and already can do it. Whenever you compile the source the compiler produces machine code. Any compiler can be instructed not to compile all the way there but to generate (optimized) assembly code instead.
In fact, that way the entire operating system could be automatically rewritten to assembly without much effort. The new assembly code would be bulkier than handcrafted one, but for most code it wouldn't matter. Someone could profile the code and optimize for size and speed where necessary, but I guess 80-90% of automatically generated code would be fine. New makefiles should be made to assemble everything and that would be it.
Therefore the task is actually easier than it looks, but the main question still remains, why? Assembly code is harder to maintain and it is incompatible with different CPU architectures.
And I doubt it would take less time to rewrite as a programmer must first read and understand the old code and only then write the new code.
I wouldn't consider myself a real programmer, but when I do create my own scripts, I find developing the logic and getting that in code takes the longest amount of time. Since that's already done, I would think the time to translate from one language to another wouldn't take nearly as long as it took to originally develop the logic and write the code (provided they have a strong understanding of both languages).
Ok let's think in programmer years. Just Linux kernel already has tens of thousands of programmer years.
That means that to (re)write it, roughly one programmer would need to work tens of thousands of years. Or a team of tens of programmers would need a thousand years. Or a team of thousand programmers would work for decades. And so on.
That's just the kernel, imagine how many more lines of code the userland contains. The idea is completely bonkers.
Without that little wonder, I'd stop using ThinkPads.
People shouldn't be allowed to lie in Operating Systems forums or programming forums.
I wouldn't consider myself a real programmer, but when I do create my own scripts, I find developing the logic and getting that in code takes the longest amount of time. Since that's already done, I would think the time to translate from one language to another wouldn't take nearly as long as it took to originally develop the logic and write the code (provided they have a strong understanding of both languages).
Me thinking it would be a bit faster to rewrite code in a new language than writing it from scratch is by no means me believing that this project has any worth.
It would be a colossal waste of time for very little benefit. You're probably talking hundreds of thousands programmer years to rewrite the entirety of 15.0 to assembly... nobody is going to do that.
Having worked in a few programming languages - and having had to read and debug programs in a few that I do not typically write in - my opinion is that translating a program into a new language is often not the best approach.
The original program will have been written (hopefully!) to optimize the code using the constructs available in that language. A different language may have additional or different constructs that either 1) work better, or 2) make it much clearer what the code is trying to do. If you want maintainable code, then clear code is better than obfuscated code translated from a different language.
Ancient example: trying to translate matrix manipulation from arrays in FORTRAN to pointers in C. Or working with ancient FORTRAN code that only has DO loops, and realizing that much of it would be far better off in a language with for-while, or repeat-until or for-each-X-in structures. Better off understanding the original purpose of the code and re-writing it efficiently in the new language.
And compilers or interpreters try to optimize what they are working with as source. I expect they do a better job at optimizing code that is well-written in that language, rather than some bastardized attempt to make that language work the way that some other language works.
Of course, modern programs make extensive use of existing libraries, modules, widgets, etc. that are often coded in a completely different language.
My impression as a newbie here is that many of the participants speak more than one (verbal, not computer) language. When speaking in your second (or third, or fourth) language, do you speak more efficiently when you think in your first language and translate into the one you want to speak, or when you brain starts off thinking in that second language? My first language is English, and I am fairly fluent in French, but I speak much more coherently in French if my brain is thinking in French. If I think in English and then try to figure out how to say it in French, it's garbled, unclear, slow, etc. Not a pretty sight.
Lets rewrite the os into assembler code! Oh wait, then we need to worry about which arch were building on, so lets make a program that reads a more generic language and builds arch specific code. Oh wait, we just invented a higher level language and a compiler again...
Lets rewrite the os into assembler code! Oh wait, then we need to worry about which arch were building on, so lets make a program that reads a more generic language and builds arch specific code. Oh wait, we just invented a higher level language and a compiler again...
I'm surprised this thread has lived this long tbh
Looks like we are a bunch of kind grownups who love to amuse this kid.
I wonder if his mommy knows that he posts crazy things in LQ...
Last edited by LuckyCyborg; 05-29-2022 at 03:04 PM.
Having worked in a few programming languages - and having had to read and debug programs in a few that I do not typically write in - my opinion is that translating a program into a new language is often not the best approach.
The original program will have been written (hopefully!) to optimize the code using the constructs available in that language. A different language may have additional or different constructs that either 1) work better, or 2) make it much clearer what the code is trying to do. If you want maintainable code, then clear code is better than obfuscated code translated from a different language.
Ancient example: trying to translate matrix manipulation from arrays in FORTRAN to pointers in C. Or working with ancient FORTRAN code that only has DO loops, and realizing that much of it would be far better off in a language with for-while, or repeat-until or for-each-X-in structures. Better off understanding the original purpose of the code and re-writing it efficiently in the new language.
And compilers or interpreters try to optimize what they are working with as source. I expect they do a better job at optimizing code that is well-written in that language, rather than some bastardized attempt to make that language work the way that some other language works.
Of course, modern programs make extensive use of existing libraries, modules, widgets, etc. that are often coded in a completely different language.
My impression as a newbie here is that many of the participants speak more than one (verbal, not computer) language. When speaking in your second (or third, or fourth) language, do you speak more efficiently when you think in your first language and translate into the one you want to speak, or when you brain starts off thinking in that second language? My first language is English, and I am fairly fluent in French, but I speak much more coherently in French if my brain is thinking in French. If I think in English and then try to figure out how to say it in French, it's garbled, unclear, slow, etc. Not a pretty sight.
Hello human,
Sometimes I translate stuff from english to spanish, sometimes from spanish to english, and sometimes I understand what something means in english but I don't know how to translate that to spanish preserving the full meaning of the words in english.
Thank you very much for your comments on source code translation ideas.
Have you checked the C++20 course that is available in freecodecamp?
Back in 2020 C++20 wasn't still fully implemented for use in Visual Studio Code.
I'll use CLion aniways, not Visual Studio Code.
Kind regards.
Quote:
Originally Posted by USUARIONUEVO
You start XD
I'm not sure if I have lied... Everyone start asking questions (make another forum thread in an appropiate subforum) and I will give answers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.