Hi,
Kevin wrote:Brendan wrote:If anyone ever gets Linux programs compiled with my compiler; then I've completely an utterly failed to meet any of the project's goals.
This is hard to believe, unless you have an explicit goal of not supporting any existing OS. The sad truth is that I wouldn't be surprised if this was really one of your goals, but it doesn't make such negative goals less stupid.
One of the main goals of the project is to see what computers could be like if everything was redesigned from scratch (with the benefit of hindsight, and without limitations imposed by compatibility).
Kevin wrote:Linux doesn't magically make languages less than Turing complete, so it's entirely possible to write the core algorithms in a way easily portable to Linux.
I have actually tried this before. The first step was to implement code that emulates the behaviour of my asynchronous messaging using datagrams/sockets. The next step is to implement a process that uses the "IPC emulation" to emulate the behaviour of my VFS (fully asynchronous IO, with a versioning file system where existing files can't be modified and you can only create new versions of them). After that you'd want to extend the "IPC emulation" code to support emulating other parts of the micro-kernel's API - specifically memory management (allocating and freeing pages at specific virtual addresses) and scheduling ("spawnThread()" and "spawnProcess()", and thread priorities, etc).
Finally, you get to start implementing any services that your application might want. For something like an IDE this would include a service that implements the "user interface protocol" (which includes keyboard/mouse events, scripts that tell the video driver what to draw, etc).
Kevin wrote:Kevin wrote:Wouldn't the user want to specify which format to use (for interoperability), whether to save it lossless or what lossy compression to use, with which options, etc.
No, the user would want a system that saves them the hassle of being forced to care about trivial details like that.
Indeed I don't mind having all graphics files (or maybe videos?) uncompressed, if the OS makes sure that I'll always have a large enough hard disk and fast enough internet connection so that I don't even notice. In practice, such things don't exist and this is a tradeoff. Tradeoffs require a choice, there's no one-size-fits-all.
Imagine if every time you open a web page in your web browser the web browser pops up hundreds of dialog boxes asking you what size different pictures should be, how much detail you want, where the page borders should be, if links should be underlined, what colour and size various pieces of text should be, etc. In this case, would you say that being forced to make all these choices would be good (or would you say that being forced to make choices is a massive design failure, and is far inferior to "it just works")?
If the user actually does want to reduce the detail of a picture (e.g. to save disk space), then they can open it in an image editor and reduce the detail.
Kevin wrote:Most conversions would be very obvious (e.g. legacy graphics file format to native graphics file format, legacy "plain text" format to native text format, etc). I can't think of any conversions that aren't obvious that actually make sense.
Your very own example: BMP -> Text -> Sound. This is not the obvious right way for opening a graphics file as audio.
Can you think of an alternative set of conversions from BMP to sound that actually makes sense, and describe how each step is performed?
Kevin wrote:Kevin wrote:Your compiler and linker don't need any options?
Is the toolchain you're currently using so completely broken that you actually need compiler and linker options, just to build normal/native applications? Why?
s/need/allow/
My compiler does work without any other options than just the source file. I never use it this way because I
want to configure it right. And I don't claim that my value of "right" is the same as yours.
Ok - which options do you use and why? More importantly; how can the design of these tools be improved to avoid your desire to use these options?
For GCC, the only things I use are:
- the input file name and output file name. The "file format converter" idea makes this entirely redundant.
- the output file type. The "file format converter" idea makes this redundant too.
- options that enable warnings. This is stupid ("all warnings" should be default).
- language options (e.g. which C standard, "pedantic", etc). I'm only having one dialect of one high level language so this isn't needed.
- optimiser settings. There only really needs to be 2 choices ("production/optimised" and "debugging/unoptimised") and I can have that without options (e.g. 2 different "executable" file types - one for normal executables and one for debugging).
- options to include libraries (e.g "-pthread") and set the include path. I'm not having any libraries or header files to begin with, so these aren't needed.
- architecture options (e.g. for cross-compiling, if things like SSE should be used, etc). For the compiler that converts HLL into portable byte-code this doesn't make sense. The compiler/s that convert byte-code to assembly only ever need the equivalent of GCC's "-march=native".
Let me know if I missed any "can't live without" compiler options.
Kevin wrote:Kevin wrote:Are you serious? Why do you want to hurt productivity so hard?
I don't think it'd hurt productivity at all. I think (if it's done right) new programmers will learn how to design software better and faster, will write software faster, and will enjoy the work more.
The just punishment for you would be having to work with the tool you're imagining.
I'm looking forward to it. I'll even buy a good "multi-touch" screen so I can drag and drop up to 10 things at once!
Kevin wrote:You haven't done anything innovative on the language itself here. You could just take C or whatever existing language you like. All that you have achieved is giving users an IDE that is cumbersome to use. Because for entering more than very little data, keyboard > mouse. Dragging an "if" keyword from a toolbar to the right position in the source takes longer than typing the two keys on the keyboard, even if you type with a single finger and don't know exactly where the keys are. With a touch screen instead of a mouse it might become less horrible, but still inferior to a keyboard.
You're forgetting keyboard shortcuts. Why would you want to type "while" when you can just press one key?
For the language itself, I didn't say it would be innovative. In fact I think it should be similar to existing languages (e.g. C, Java/C#) to make it easier for existing programmers to learn.
Kevin wrote:Brendan wrote:Now look at the box at the bottom left. This is a class called "CheckingAccount". It has 2 methods - "processCheck()" and "withdrawal()". I'm sure you can all imagine a tool for creating these diagrams if you haven't actually used one yet.
More than one. They all suck. They slow me down because getting my ideas into these fscking tools takes so long.
While I do agree, most of the problem is that the tools I've used have only been UML editors (and weren't able to generate code from the class diagram, for example). This means that everything you do in the class diagram has to be typed in a second time when you start writing the code, which is a duplication of work (and doesn't help to save any time). There are better tools that are able to generate code from the class diagram (it's just that I haven't used them).
Cheers,
Brendan