Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
17 user(s) are online (7 user(s) are browsing Forum)

Members: 0
Guests: 17

more...


Browsing this Thread:   1 Anonymous Users




(1) 2 »


Re: Freeform fantasizing -- the Perfect Desktop OS
#17
Just popping in
Just popping in


See User information
Quote:

bloodline wrote:
I've always been keen on the idea of having the "Executable Format" actually as the gcc intermediate code, and then doing the final compile at the loading stage (by the segloader). That way the same "Executable" could run on both a PPC or a x86.


GCC eh? Are you sure the GCC intermediary language is suited for this task?

If it is, what does TenDRA offer more?

Posted on: 2004/4/30 20:13
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#16
Home away from home
Home away from home


See User information
I've always been keen on the idea of having the "Executable Format" actually as the gcc intermediate code, and then doing the final compile at the loading stage (by the segloader). That way the same "Executable" could run on both a PPC or a x86.

Posted on: 2004/4/30 19:48
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#15
Home away from home
Home away from home


See User information
Good idea. Furthermore, I believe that an ordinary C or C++ version should be available always, for non-optimized platforms. I could imagine, easily, that there'd be an optimized, hand-coded version of a codec, for example, for the x86, PPC, and 68K. Then someone tries to run it on an alpha. Another possible scenario is that someone writes an optimized version for a Pentium III, for example, but it turns out that the built-in-optimizer is able to do a better job than the hand-optmized code for an AMD64, by taking advantage of 64 bits or extended instructions. Even though both methods would run, the user should always be left with a platform-independant choice.

I agree strongly that a standard should emerge, so that the installer can find optimized versions easily and automatically, without user intervention (except that the user is able to turn it off, if for example "Expert" mode is chosen in the installer).


Posted on: 2004/4/29 21:51
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#14
Just popping in
Just popping in


See User information
Quote:

You could restore platform independence to a certain extent by including object files for assembly functions for a variety of processors and/or platforms. For example, a codec would be mostly half-compiled code, plus an x86 object file for accelerated functions, plus a PPC object file for the same thing. On x86 systems, the back-end would link in the x86 object file.


I think guidelines convercing this are a must. Like there are the UI design guidelines for AmigaOS, there should be cross-platform guidelines for programmers now.

You could ask the programmer to always provide a 100% platform-independent version of their application. In addition to this, he can optionally provide optimized object files per CPU, which can be linked on installation (2nd step of compilation).

The standard installer would detect if any optimized object files for the host platform are included in the archive and link it automatically, instead of the slower platfom-independent oode.

Posted on: 2004/4/29 9:10
- darklite...
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#13
Home away from home
Home away from home


See User information
Well, you do have valid points. Maybe if it combined mid-level code from the gcc front-end with object files from assembly language sections. It breaks the platform independence, but makes it more useful. Platform independent programs would not use object files, while optimized software like drivers and codecs would use object files in addition to the independent code.

You could restore platform independence to a certain extent by including object files for assembly functions for a variety of processors and/or platforms. For example, a codec would be mostly half-compiled code, plus an x86 object file for accelerated functions, plus a PPC object file for the same thing. On x86 systems, the back-end would link in the x86 object file.

Posted on: 2004/4/29 8:33
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#12
Home away from home
Home away from home


See User information
Well, it's not like the assembler will suddenly cease to function -- but of course, you'll have to choose -- the same choice as ever. Optimized code or platform-independant code. For drivers (in some cases) and for codecs, this hardly seems too bad, especially since the actual speed-sensitive part of the code is usually small and specific. Such small exceptional cases hardly are reason to dismiss the entire idea -- just like using a compiler in the first place.

Posted on: 2004/4/29 7:45
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#11
Home away from home
Home away from home


See User information
Quote:

rinnan wrote:
Not sure what you mean here. Probably the most famous and most used compiler in the world, gcc, is based on this design already. The only thing it lacks, in order to do exactly what is envisioned, is the feature of saving the intermediate output from the front end (right now it just feeds it right into the back-end). If you write in C, C++, or any language more abstract than assembly (including, interestingly, AmigaDE's pseudo-assembly), then the specifics of the CPU are supposed to be hidden from you. Hand-optimizations are wonderful for drivers, datatypes, and so on. But as the optimizers in compilers get better and better, hand-optimization has less and less effect. Eventually, compilers will surpass the human coder's skill in optimization. To some extent this has already happened. I haven't seen a even a driver written in assembly in quite a while, and yet they run with sufficient speed.

Are you imagining an ideal world where programmers carefully code in C, or C++, with the clear knowledge of the CPU they are targetting in their mind? Coding carefully in such a way to encourage the compiler to take advantage of the specific CPU's natural skills? It doesn't work this way. Already, coders code in languages and in styles that are comfortable to them, and leave it to the compiler to figure out how to make it fast. The technique of "cutting the compiler in half" gives the back end more freedom to specifically tailor the resulting machine code to be optimum for the specific target CPU. It will produce faster code than what we have now, not slower code.


You are ignoring many important pieces of code. For example, every single video and audio codec uses hand-optimized assembly language subroutines for things like iDCT, sub-band filtering, color-space conversion, motion estimation, etc. Using the C code in place of the assembly language and running it through gcc at the highest optimization level results in code that is many times slower than what the assembly language gives.

I don't image an ideal world, I imagine the REAL world where hand-tuned assembly language kicks the sh-t out of gcc every time. The real world where programmers routinely use assembly language functions for all sorts of reasons. All of that must be thrown out to use the split-compiler.

Posted on: 2004/4/28 23:45
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#10
Home away from home
Home away from home


See User information
Quote:
Here's a question then... would this back-end compiling also work for drivers as well? Say your audio or video driver would then be compiled specifically for your CPU? Having the apps and OS compiled in this way I think sounds like a nice idea considering I myself don't feel like I should have to muck around with a compiler to get an optimized system up and running. It should be able to do it for me without my intervention, but having source for those who want it is just fine.


In short, yes. This "split-compiling" is just another way of handling the task of translating source code into machine code. Rather than doing it all at once, it is done half on the programmer's computer and half on the target machine. What the code is, whether a driver, app, or operating system component, is irrelevant to this process.

In my experience, the problem of "mucking around with a compiler" can be, and has been, solved even without the split-compiler process.

I don't know of any systems where this idea is an integrated part of the system (other than Oberon/Juice) but there's no techincal barrier to it working seamlessly and invisibly (as it does with Juice).

The java byte-code system is actually more complicated than the split-compiler approach and it works seamlessly.

More on the GUI idea I'm envisioning... I believe it's been misunderstood.

The current metaphor is the window system. In this metaphor you have multiple arbitrarily sized viewing areas, called windows. They can overlap arbitrarily, and can be partially offscreen. It is possible for there to be no windows, and is possible that there is screenspace which is not covered by a window. This is unless you consider the root window to be a window.

In the system I'm envisoning, a frame metaphor is used. In this system, the first frame covers the entire screen. You can split its real-estate up by adding more frames. In this system, all of the frames, taken together, always cover the entire screen. Frames never overlap, and frames cannot be partially offscreen. If you have two frames, arranged vertically, such that you have a top-frame and a bottom-frame, then if you were to make the bottom one higher by dragging its title bar upward, the top one would automatically be resized to be shorter. The rule of no overlapping is always preserved exactly, as is the rule of the entire screen always being covered completely. The one exception to "no overlap" rule would be frame stacks, where multiple frames exactly overlap each other and you can choose between them. The frames in effect would act more like Amiga screens than windows. Dragging a frame up and down, if there were multiple, vertically arranged frames, would look and act a lot like an Amiga screen, except that all resolutions and color depths of both frames would, of course, be exactly the same.


Posted on: 2004/4/28 1:27
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#9
Home away from home
Home away from home


See User information
Quote:
The problem with "cutting the compiler in half" is that it forces you to remove any optimizations you might make by hand. All you are allowed is plain C/C++/whatever code. You can make no assumptions as to the CPU that might make things faster. Instead, you use the most generic code possible and pray that the other half of the compiler does a good job. Sometimes it will, and sometimes it won't. No programmer worth spitting will put up with that.


Not sure what you mean here. Probably the most famous and most used compiler in the world, gcc, is based on this design already. The only thing it lacks, in order to do exactly what is envisioned, is the feature of saving the intermediate output from the front end (right now it just feeds it right into the back-end). If you write in C, C++, or any language more abstract than assembly (including, interestingly, AmigaDE's pseudo-assembly), then the specifics of the CPU are supposed to be hidden from you. Hand-optimizations are wonderful for drivers, datatypes, and so on. But as the optimizers in compilers get better and better, hand-optimization has less and less effect. Eventually, compilers will surpass the human coder's skill in optimization. To some extent this has already happened. I haven't seen a even a driver written in assembly in quite a while, and yet they run with sufficient speed.

Are you imagining an ideal world where programmers carefully code in C, or C++, with the clear knowledge of the CPU they are targetting in their mind? Coding carefully in such a way to encourage the compiler to take advantage of the specific CPU's natural skills? It doesn't work this way. Already, coders code in languages and in styles that are comfortable to them, and leave it to the compiler to figure out how to make it fast. The technique of "cutting the compiler in half" gives the back end more freedom to specifically tailor the resulting machine code to be optimum for the specific target CPU. It will produce faster code than what we have now, not slower code.

Posted on: 2004/4/28 1:10
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Freeform fantasizing -- the Perfect Desktop OS
#8
Home away from home
Home away from home


See User information
Quote:

rinnan wrote:
All compilers, including GCC, have a front-end and a back-end. The front end converts the source code into an intermediate form -- it strips comments, resolves symbols, digests the commands into a more machine-code-like stream, and even performs some optimization. But at this stage, it's a pre-digested mess that doesn't mean anything to any specific CPU. Then the back-end takes over. It translates this code into machine code that the target CPU can understand, doing further optimizations. The "cut-the-compiler-in-half" idea basically works this way. The programmer runs the front-end, but not the back-end, on the code when they want to distribute it. What issues from the front end is captured into a standard format and saved into a file. Then, the user, downloads this onto their own machine and runs the back-end process on their own machine, and runs it. Of course this works invisibly. There is no virtual machine, no just-in-time compiling of bytecode, nothing, so no slowdown. In fact, a speedup. Here's why:

When you download a binary for your AROS box, or even compile one using the current instructions and build system, it creates something that would be happy running on your screaming new Pentium 4, or AMD, but would also be quite happy running on a 486. However, the AMD and 486 do differ (REALLY?? ) YES, REALLY! The AMD has more instructions and for optimal execution, would organize them differnetly or use differnet instructions than a 486, but an executable compiled for a 486 can't take advantage of them (though it will, of course, still run). If your OS does the final back-end processing on your own machine, however, it knows that it's an AMD and not a 486, so will optimize the code production around that chip. True, the final binary will run only on that specific chip -- but if a 486 user downloads the same intermediate code, their back-end compiler will do the right thing and produce 486 machine code for them. All in all, it will result in a faster, not slower, experience than what happens now with AROS.

I still believe that downloading the source directly and compiling it entirely is best -- we have all the tools today to do this, up and running, and remember you can obfuscate it if you need to deal with it in a proprietary way.



The problem with "cutting the compiler in half" is that it forces you to remove any optimizations you might make by hand. All you are allowed is plain C/C++/whatever code. You can make no assumptions as to the CPU that might make things faster. Instead, you use the most generic code possible and pray that the other half of the compiler does a good job. Sometimes it will, and sometimes it won't. No programmer worth spitting will put up with that.

Quote:

rinnan wrote:
Graphics/Intuition (interface) -- The old concepts of windows would go away and be replaced by the much more efficient concept of frames and overlays. The whole screen starts as a frame but would subdivide into smaller frames, which of course, can further subdivide ad-infinum. Features like frame-swapping, hiding, and an expose-like finding utility would be there to assist the user. Overlays, which could be sprites, mouse pointers, and other informative over-the-whole-mess elements would exist. Frame-stacks would also exist, in situations where that would make sense. Frames could be made to snap to their smallest or biggest possible size with an easy mouse gesture. Again, hardware independance would be key, with total physical independance of the visual system. Resolution, and to a lesser-extent, color depth wouldn't matter, fonts, icons, and frame frames would be rendered through vector information.


Graphics on the Amiga is already handled this way. Intuition sits on top of the layers library. Intuition Windows are just higher level abstractions of lower level layers. Just about everything you put above is already part and parcel of layers. The graphics hardware independence is there too - layers are hardware abstracted to RastPorts. Each layer has an associated RastPort. The RastPort decides what and how to draw the data.

Fonts based on vector info are drawn vector-wise. Fonts that are not vector based can't be drawn that way. Frames and buttons are drawn vector-wise. Most icons are bitmaps, so again, they can't be drawn that way.


Posted on: 2004/4/27 23:51
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 




(1) 2 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project