Page 2 of 3

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 3:39 pm
by mathematician
iansjack wrote:You need someone else (from 20 years ago) to tell us why you hate Unix?

I note that the forward is by an "Apple Fellow, Apple Computer Inc.". Who says irony is dead?
I hate Unix because it drives me to drink.

Are you going to tell me that the Mac OS has BSD at its core? Well, Apple have the good sense to keep that fact well hidden.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 3:47 pm
by mathematician
iansjack wrote:I'd say that you are looking at the wrong end of the problem. It's not the language definition or the compiler that determines the object file format, but the assembler and binutils. I'd say that you need to start there, writing an assembler that can output elf64 object files and then a linker that can handle them, before worrying about the compiler end of thIngs.

TBH, I would have serious doubts that someone who dismsses out of hand a very successfull range of operating systems, and is unable to get a simple Linux installation to work, would be capable of producing such software. I suspect that you will get bogged down with this and never get as far as writing your OS.
I have written a dissasembler in the past, as part of a debugger, and the bit flipping in that is unlikely to be substantially different to going the other way.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 3:50 pm
by Kazinsal
mathematician wrote:
iansjack wrote:You need someone else (from 20 years ago) to tell us why you hate Unix?

I note that the forward is by an "Apple Fellow, Apple Computer Inc.". Who says irony is dead?
I hate Unix because it drives me to drink.

Are you going to tell me that the Mac OS has BSD at its core? Well, Apple have the good sense to keep that fact well hidden.
That's not Unix, that's alcoholism.

OSX has Mach at its core, by the way. The FreeBSD tools live on top of that.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 4:31 pm
by no92
I'd be great if a mod could lock this one - it's turning into a discussion with a childish hater that does not listen to people with superior knowledge. This might get too heated here if this goes on.

@mathematician: OSdevers are mostly using Unix tools. If you don't like them, don't start even talking about anything non-Unix. Nobody here seriously cares about Windows fanboys with no experience. Tip: some people use MSVC for compiling and then convert the PE executable to any format they like. These guys have a lot of experience and are thus able to solve everything compiler or setup-related by themselves.

Setting up gcc on Linux is often as simple as typing gcc into a Terminal. Compared to that, getting started with Windows is a nightmare.

Somebody who is not able to set up a Linux Distro can't be an OSdever. Above-average knowledge is required for understanding what steps are needed. Installing Linux Distros is really easy today. Fixing issues is also pretty easy, provided that you're able to use Google properly (an ability with a lot of people lack)

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 4:32 pm
by iansjack
mathematician wrote:I have written a dissasembler in the past, as part of a debugger, and the bit flipping in that is unlikely to be substantially different to going the other way.
I would disagree with that. Producing efficient assembler output and then assembling it is, IMO, a far harder task than disassembling machine code. I also think you underestimate the steps involved in producing verifiably correct elf64 object files and writing a linker for those files. But I may well be wrong.

It is the inability to install and use a simple Linux system that bothers me. That would seem, to me, to be a far easier task than writing a compiler (for a new language), an assembler, and a linker.
Are you going to tell me that the Mac OS has BSD at its core? Well, Apple have the good sense to keep that fact well hidden.
I'm not going to tell you that (mainly because it is a gross oversimplification and, in essence, is not true). You might as well say that Windows has some elements of BSD at its core (which it does). But I'm pleased that you recognize that a true Unix (one of the few true Unixes) can so effectively hide the details that you don't like. As you base your arguments on complaints made about Unix 20 years ago I'm not even convinced that you really know what it is about Unix that you dislike. My reasons for disliking mobile phones 20 years ago would really not hold up today.

Anyway, this is a rather pointless argument. I'm not really interested in debating irrational dislikes of Unix, Windows, OS X, or any other operating system. (It reminds me rather of wars between fans of the XBox or the PlayStations.) I embrace them all and I think they all have things to teach us.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 5:46 pm
by Brynet-Inc
I'm not going to expand much on what others have said, but dismissive comments like "It's Mach with a FreeBSD userland" are often repeated by the misinformed, the kernel itself contains code from FreeBSD/NetBSD and OpenBSD (pf), as does a non-insignificant portion of the C libraries and headers. The userland is mishmash of GNU, BSD, Apple original components. A lot of the proprietary GUI components rely on the underlying Unix environment, some are frontends to their companion command-line administration utilities.

It is undoubtedly true that Apple's kernel contains Mach and Apple original code. But what is often ignored is that CMU Mach was itself derived from the BSD kernel, developed as a drop-in replacement for the monolithic 4.3 BSD kernel. 4.4BSD in fact inherited the virtual memory subsystem from Mach, and FreeBSD still continues to use it today (..NetBSD replaced it with UVM, also inherited by OpenBSD).

This is all documented history, and a lot more interesting than spreading FUD.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 5:54 pm
by mathematician
iansjack wrote:
mathematician wrote:It is the inability to install and use a simple Linux system that bothers me.
I can install it just fine. Whether or not it stays installed is another matter. If it doesn't uninstall itself, as Mint recently did, I will do the honours for it.

Anyway, this is a rather pointless argument. I'm not really interested in debating irrational dislikes of Unix, Windows, OS X
is that why you are doing so right now?

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 6:12 pm
by mathematician
no92 wrote:I'd be great if a mod could lock this one - it's turning into a discussion with a childish hater that does not listen to people with superior knowledge. This might get too heated here if this goes on.

@mathematician: OSdevers are mostly using Unix tools. If you don't like them, don't start even talking about anything non-Unix. Nobody here seriously cares about Windows fanboys with no experience. Tip: some people use MSVC for compiling and then convert the PE executable to any format they like. These guys have a lot of experience and are thus able to solve everything compiler or setup-related by themselves.
You can write an operating system without Unix. Using Open Watcom, I got as far as the memory manager, but 32 bit osdev seems a bit dated in these days of 64 bit processors. The people I know of who use Visual Studio for osdev also use the PE file format. I might, and probably will, use MSVC for the UEFI loader, but there my use for it will end. As far as osdev is concerned. I will, of course, be using it for a compiler and linker.

Somebody who is not able to set up a Linux Distro can't be an OSdever. Above-average knowledge is required for understanding what steps are needed. Installing Linux Distros is really easy today. Fixing issues is also pretty easy, provided that you're able to use Google properly (an ability with a lot of people lack)
I was probably programming the PC's hardware in assembly language before you were even born.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 6:20 pm
by konacake
I'm sure you're happy to know Windows NT was actually Microsoft's attempts at cloning Unix, and was designed by some Unix wizards. So I think you'd actually be happier in one of the Windows 9x series, maybe Windows Me?
In addition, it seems you specifically don't like Linux. Unix is an OS architecture. I really, really doubt you hate the Unix architecture that much. It just sounds like you don't know how to manage Linux and got fed up with it, and favor Apple and Microsoft's more professional environments. Which I would normally understand, except this is an OS development forum. I've managed to install Arch just fine, which is about as manual as you can get with Linux, it's only next to compiling it which is what Gentoo does. In fact, messing with Linux's internals was what got me into OS development, I enjoyed finding out about how it worked and I wanted to know more. But I'm rambling.

Anyway, all this is pointless. Just use MinGW and stop worrying about who made it or where it's from. The point is it's the compiler you want and it works natively on Windows. I understand not liking Unix, but refusing to use tools that work is just having a tantrum.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 6:22 pm
by mathematician
mathematician wrote:
no92 wrote:I'd be great if a mod could lock this one - it's turning into a discussion with a childish hater that does not listen to people with superior knowledge. This might get too heated here if this goes on.

@mathematician: OSdevers are mostly using Unix tools. If you don't like them, don't start even talking about anything non-Unix. Nobody here seriously cares about Windows fanboys with no experience. Tip: some people use MSVC for compiling and then convert the PE executable to any format they like. These guys have a lot of experience and are thus able to solve everything compiler or setup-related by themselves.
You can write an operating system without Unix. Using Open Watcom, I got as far as the memory manager, but 32 bit osdev seems a bit dated in these days of 64 bit processors. The people I know of who use Visual Studio for osdev also use the PE file format. I might, and probably will, use MSVC for the UEFI loader, but there my use for it will end. As far as osdev is concerned. I will, of course, be using it for a compiler and linker, and I have got far enough with that to know that 50% or more of the parser's code is error handling.

Somebody who is not able to set up a Linux Distro can't be an OSdever. Above-average knowledge is required for understanding what steps are needed. Installing Linux Distros is really easy today. Fixing issues is also pretty easy, provided that you're able to use Google properly (an ability with a lot of people lack)
I was probably programming the PC's hardware in assembly language before you were even born.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 6:34 pm
by mathematician
konacake wrote:I'm sure you're happy to know Windows NT was actually Microsoft's attempts at cloning Unix, and was designed by some Unix wizards. So I think you'd actually be happier in one of the Windows 9x series, maybe Windows Me?
Some Unix programmers worked on the early versions of Windows. That is why the PE file format is based upon COFF, but the internal architecture of Windows doesn't even remotely ressemble Unix. Apart from anything else, the Windows command line is a GUI program pretending to be a command line program, whereas Linux is a text based operating system, pretending to be a GUI system. If you had ever programmed Windows at a level which doesn't hide the details from you, you would know the difference.

Anyway, all this is pointless. Just use MinGW and stop worrying about who made it or where it's from. The point is it's the compiler you want and it works natively on Windows. I understand not liking Unix, but refusing to use tools that work is just having a tantrum.
Also, for osdev you need to be fairly sure that you are not going to get a lot of gunk linked in with it, and you can't be sure of that with MinGW. It is intended for applications development. Even Opem Watcom isn't 100% perfect in that respect.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 6:59 pm
by konacake
mathematician wrote: Some Unix programmers worked on the early versions of Windows. That is why the PE file format is based upon COFF, but the internal architecture of Windows doesn't even remotely ressemble Unix. Apart from anything else, the Windows command line is a GUI program pretending to be a command line program, whereas Linux is a text based operating system, pretending to be a GUI system. If you had ever programmed Windows at a level which doesn't hide the details from you, you would know the difference.
what?
did you read this before posting it? you sound like my grandma trying to describe the differences between windows and linux
Windows uses a compositor to run a window manager, and it has a terminal emulator that runs in a window
Linux uses a compositor to run a window manager, and it has a terminal emulator that runs in a window
Windows can go into command-line mode though recovery mode
Linux can go into command-line mode by killing X11, or just not turning it on if you don't have it set to start at boot.
I have no idea how you don't understand this or what you even think the difference is. What are you even implying? Do you think Windows has it's compositor built into the kernel (which it's not), and you're criticizing Linux for not doing that? I'm genuinely confused. More over, that has nothing to do with Unix.
Also, for osdev you need to be fairly sure that you are not going to get a lot of gunk linked in with it, and you can't be sure of that with MinGW. It is intended for applications development. Even Opem Watcom isn't 100% perfect in that respect.
Yes you can, look up the compiler flags. Compilers don't just "add in gunk". If you don't want it linking anything extra, don't use the linker. Do you see what you're doing here? You're brushing everything off before you even know about it.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 7:45 pm
by AndrewAPrice
mathematician wrote:I can install it just fine. Whether or not it stays installed is another matter. If it doesn't uninstall itself, as Mint recently did, I will do the honours for it.
LOL It sounds like you updated Windows and your boot loader was overwritten, and you think Linux uninstalled itself.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 8:31 pm
by mathematician
MessiahAndrw wrote:
mathematician wrote:I can install it just fine. Whether or not it stays installed is another matter. If it doesn't uninstall itself, as Mint recently did, I will do the honours for it.
LOL It sounds like you updated Windows and your boot loader was overwritten, and you think Linux uninstalled itself.
No I didn't. I have had Windows 7 on this computer ever since it was released. The Linux loader decided that the partition it was on no longer existed. It did, and does, until I find some other use for it, or until I am feeling masochistic enough to give Linus another try.

Re: Custom Programming Language

Posted: Fri Nov 28, 2014 8:49 pm
by konacake
I was trying to continue the discussion, I was saying OP is blindly afraid of MinGW of "what it might do" to your binary because you feel like it would be easier to make a whole new compiler/linker than just find out how an existing one works, an existing one pretty much everyone here uses at that (GCC, not specifically MinGW), all because you're so petrified of Linux you're afraid to use anything even developed on it. Which sounds absurd and ignorant, by the way.

There's also Clang, too. I really don't care what you use, I'm just saying, you should really learn how a tool works before declaring it made by a witch and banishing it from the Church of Windows. This is legitimate paranoia on your part of refusing to look up how to use it. Actually, all of your arguments are based on not knowing how something works and just brushing it off as being defective. This is extremely toxic behavior and it won't get you very far in life. I don't really like Linux either, but for a whole different set of reasons than yours, educated reasons.