OSDev.org
https://forum.osdev.org/

Dawn
https://forum.osdev.org/viewtopic.php?f=2&t=31420
Page 7 of 7

Author:  Schol-R-LEA [ Thu Aug 10, 2017 7:43 am ]
Post subject:  Re: Dawn

Geri wrote:
-what you are saying before, is that a more basic low-level language would suit the subleq better than actually a C compiled code. .

No, you've got it exactly backwards. I am saying that a more abstract language would be better, or at least a language which has a different set of core abstractions. You must have read enough of my posts to others on this forum to know I am no advocate of low-level programming; I am Lisp programmer, FFS! I am planning on using a Lisp-like language for my own OS, why would I recommend a low-level one for yours?

The purpose of the exercise was to show how dependent C is on the specifics of register machines, and more to the point, how efficient C programming requires you to be aware of how it targets the register usage. In a more abstract language, one not tied so directly to what the compiler emits, the compiler would be able to rearrange the code in a way that is efficient, without having to be told how to by the coder.

The problem is that C is assuming a very close match the the hardware, which isn't the case for OISC; it paints you into a corner regarding the possible optimizations. You need to use something that can be optimized for OISC, which C, with its register orientation, can't be.

I am saying that you should consider using a language which is sufficiently abstract that the compiler has enough freedom to choose its own optimizations rather that being forced into the ones assumed by the programmer and the language. For OISC, that probably means a dataflow language, something that incorporates a state transition as its core abstraction. TBH, that's a type of language we need more of anyway; even 'high-level languages' such as Java and C++ are still too focused on imperative programming rather than declarative programming, and for a state-transition system like OISC, a declarative language is a must.

Author:  Geri [ Thu Aug 10, 2017 9:17 am ]
Post subject:  Re: Dawn

i dont know lisp (never actually seen or heard someone using it). but i know BASIC. originally i planned to do BASIC too, but i stripped it out from the ideas to not waste time on it. (and i was not interested in making a c64 style of OS as there is C instead, which is a much better choice, and BASIC syntax is prety much like the C syntax, so everybody should be capable doing C if he does basic).

a BASIC interpreter, for example, would be just as slow as everywhere else, indeed (so we cant really talk about how much it suits). but a compiled basic code would run just as the compiled c code, it requires almost the same kind of compilation (redimmable arrays, local or global type of variables, trick to do the stack on function calls, if somebody even uses them).

basically a small preprocessor could render it to C code, then it could been compiled as C to binary. the problems with basic is the variable handling - at default, everything is handled as floats, and due to this fact, it would waste a lot more cycles in most cases than C does (for example the code would require a lot of internal data type conversions, and a lot of unaligned memory access).

basically selecting the C as the main programming language of the OS and this platform was not a choice, it was the only solution. Its currently the only widespread and actively used language, that is relatively easily capable to carry an operating system and itself on its back.

-i would rule out all esoteric languages, like lisp or anything raritys as the system has to offer familiar solutions for the developers.

-java is NOT free (and i personally consider it just as **** like the c#).

-c++ is too slow, time demanding, large, and cpu consuming. also questionable how to do new/delete as language elements in a undeveloped enrivonment... i would not write a compiler for it.

-javascript is just a downstripped, interpreted (but probably compilable) loose-type C variant without even thread support, and it can nothing to offer against c meanwhile it would need a lot of more time to implement even a tiny fraction of it.

-c# is just c++ with 500 mbyte of microsoft libraries slower than a 286 designed for business showmans without knowledge and without capabilities to do anything, its alreday died in practice, and implementing all of its **** would take eons. is anyone seen anything serious in that shitty language ever? i dont think so.

-BASIC would be good, but it were killed by C in the last 30 years, and the two language is very similar in a lot of aspects, but BASIC was basically misdeveloped in the last decades (it seems in the end it only attracted the bad programmers and bad communitys)

the conclusion is that C is the only possible solution (like almost always, if a project is more serious than clicking a window with buttons together with your mouse to show your boss and your mom how cool computer wizzard are you), either every other theocretical solution is not exists, is obsolote (basic), not works in practice (javascript, c#), not a real programming language just some private business wizzard thingie (java, c# again).

so this is not really my choice, c was the only realistically walkable path when creating this system, other chooses not even emerged, as this were the only possible way, and doing a C compiler is not THAT hard (even doing a BASIC compiler would be the same complexity)

Author:  Schol-R-LEA [ Thu Aug 10, 2017 9:46 am ]
Post subject:  Re: Dawn

I give up. You can go do what you want, enjoy your lemon juice. You'll at least be invisible to me and anyone else who have plonked you in their forum settings.
Image

Author:  Geri [ Thu Aug 10, 2017 10:24 am ]
Post subject:  Re: Dawn

nani?
Image

Author:  dozniak [ Thu Aug 10, 2017 5:11 pm ]
Post subject:  Re: Dawn

Try a forth machine for your OISC stuff. Might be fun.

Author:  Geri [ Thu Aug 10, 2017 5:25 pm ]
Post subject:  Re: Dawn

dozniak wrote:
Try a forth machine for your OISC stuff. Might be fun.


or a brainfuck machine, which have an extra ascii code for stabbing people with ceramic squirrels

Author:  Geri [ Fri Aug 11, 2017 3:54 pm ]
Post subject:  Re: Dawn

2017, aug 11. - Several bugfix

-Line numbers in the text editor were missing due to a bug.
-End and Home buttons were bugous in file browser.
-Some typos and spelling errors fixed in the manual.
-Opening the C compiler will give a short example code.
-Some more infos added about the compiler.
-Fixed the scroll bar in disk browser.

The protector saint of this release is Misaki Mei
Image

Author:  Geri [ Tue Aug 15, 2017 5:41 am ]
Post subject:  Re: Dawn

an unknown misteryous hero prety much likes dawn os

Image

Author:  Geri [ Fri Aug 18, 2017 3:58 pm ]
Post subject:  Re: Dawn

DawnOS made a major step forward.

The operating system is now somewhat stabilized on slow computers, the system stays responsive even around 300 million instructions per second.

Image

-Better autodetection of extra-low screen resolution on boot, to keep the screen readable even on 512x384 and below

-Various optimisations in the operating system resulted 10-30% speed-up in the overall performance

-The kernel can now handle mouse actions on much lower-end machines than before

-Fixed the random number generator

-Fixed multiple bugs with the virtual keyboard

-Fixed a ghost click on start menu

-Ranemad one of the games

-Added snake game

-Restart/Shutdown message is now more readable on every resolution

-Fixed a click-selection and a double-click issue in the file browser

-Fixed the sleep icon

-Start menu comes up properly if its called while a full-screen mode application runs


Image

The protector saint is still Misaki Mei.

Page 7 of 7 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/