You're thinking of C. Assembly isn't meant to be portable. The idea of writing assembly code is to tune some very efficiency-critical code for a particular platform.
What portable code would you write, which wouldn't be easier (and probably faster, since the compiler could do more optimization) in C? (Or -- god forbid -- a high level language?)
Typically, garbage collection happens when an allocation occurs and no space is available in the heap. I'm not sure how it is typically done in a JVM, but you wouldn't need parallelism or even non-determinism to do it.
Java isn't the language I'd choose to do it, but I threw it out because it has many of the properties that the other, more obscure languages (O'Caml, SML) I'm referring to. Those other languages are much more efficient, though.
I guess what I'm saying is, microkernel in C/ASM, as small as possible -- the implement the rest in a high level language (or many different ones, if your architecture is good).
I don't know how JVM garbage collection is usually done, but there's no reason it would need to be nondeterministic. The garbage collectors I know only run when an allocation is done (and there is not enough room). There are implications for real-time stuff (since an allocation could potentially take a long time because of a collection), but there are incremental collectors which solve this problem.
Anyway, interrupt handling is sensitive to that, for sure. But filesystem code or TCP/IP shouldn't be!
Moving to a high level language certainly wouldn't slow your computer down to the speed of a 486. A highly conservative estimate would be that it is about twice as slow. (Java is pretty inefficient, but O'Caml is literally as fast as C.) Of course, this only applies to kernel stuff, which is not where your computer spends most of its time. But, since it is a higher-level language we get the following interesting benefits:
- faster to write the code, so can spend more time optimizing what matters (and easier to implement more difficult algorithms). This could lead to a faster system, since
- NO MORE BUFFER OVERFLOWS, meaning that it will be way more secure than linux or windows
- More portable
- More modular, meaning that it is easier to extend by people who don't understand the whole system, and more easily managed by those who do
- along with all the other benefits of high-level languages
Admittedly there would be a significant challenge integrating the hardware stuff with the high-level stuff. That's why I said it would be a feat. In other respects, doing programming in advanced high level languages tends to be quite enjoyable!
Even more difficult, though, is convincing slashdot kids that C and lots of eyeballs just doesn't scale well. I think we will have to do this to compete with microsoft in the next decade, so hopefully we will be mature enough to manage it! (Microsoft has hired up a bunch of great programming language researchers, and they are as we speak working on language technologies for their operating systems stuff. As the open source projects and their own projects grow too large to be understood and debugged by humans, machine-checking will become the technology that separates the crashy software from the robust.)
Why do you need pointers to write complicated programs? Some of the bootstrapping and hardware access in a kernel would probably need to be written in C or assembly, but there is a significant amount of code which could be written in any programming language. Pointers in this case would be used simply because C does not provide anything more abstract.
You should learn some more about programming, I think. =)
Anyway, I am thinking more of a minimal microkernel written in C or assembly (at some level you will need to be doing hardware access) but as much as possible of the algorithmic, non-machine specific stuff written in the high level language (ie, TCP-IP, file system, access control, scheduler..)
A step backwards...
on
MenuetOS Debuts
·
· Score: 3, Interesting
What crazy reasoning drives a project to write something complicated and difficult in a lower-level language than the current best practice?
The only thing I can think of is the idea that it will be leaner and faster, which are seriously misguided notions given the trend of faster and faster hardware. What we care about now are scalable algorithms, stable and robust kernels and drivers, and appropriate abstractions to allow easy extensions. All of these are made easier by high-level languages. They are made more difficult by machine language.
What I'd like to see is a powerful kernel mostly written in a very high level safe language like O'Caml or even Java. That would be a feat with some important consequences.
> basically the simplest model of a machine
> necessary to compute anything that is
> computable.
As an irrelevant aside, I'd like to claim that the lambda calculus is a more simple ('turing-complete') model of computation than turing machines. (Though the turing machine certainly is simple too.)
Right on. I'll gladly take a safe memory-managed language like Java to write my efficient code, since it means I can spend more time optimizing things which really matter (algorithms).
By the way, there exist languages with the same abstraction qualities as java (safety, garbage collection, portability, etc.) which aren't slow in the sense that the original poster meant. Check out O'Caml, for instance. It's got a lot more interesting features than Java, and runs as fast as C.
There are a *lot* of unix network daemons which are vulnerable, mainly because they tend to be written in C.
Relying on folklore to tell you which services you trust seems pretty sloppy to me; unless you've somehow guaranteed that your services are more secure than the ones listed, I say the worm writers will be the ones laughing.
My feeling is that most of these are Microsoft-based worms because that is the most popular platform. (And perhaps the users are less concerned about computers than we are.) There have been plenty of exploitable holes in pine, for instance; it's just that not enough people use the same version of pine for a successful worm to be built around it.
I think perhaps this is an argument for diversity more than it is an argument against Microsoft.
I successfully went 4 years of undergraduate with only about 50 spams. It's easy to do, just don't publish your e-mail address everywhere. On accounts where I do get a lot of spam, I just delete it. No big deal, and it kills fewer trees than postal mail. It's also easier to automate. Spam that is a scam or illegal deserves to be dealt with using existing consumer-protection laws, but I am opposed to any kind of government regulation of the internet. We have technological measures which are more effective than any legal remedies; I suggest that we use (and continue to develop) them.
MD5 might be overkill, but I don't think that creating a pretty accurate fingerprint which would be resistant to extra random characters would be too difficult.
Since they won't be able to make money simply by selling copies of software (but instead by writing it), they add value to the software when they ship it with the source code. In any case, all it takes is one leaked copy...
The GPL is the closest approximation (that we know of) to the lack of copyright we seek; it (ab)uses current copyright law in order to spread and eventually (we hope) make it obsolete. At least, it gets people to think about these issues.
Yes, it is too bad that we have to use copyright law to do this -- but we have to play by the rules of the government we live under.
> It is my property, I can and will choose a license that fits MY needs as a developer.
I think we are saying that it is not your property. In any case, this kind of "property" (as opposed to natural property: physical things like your belongings, home, automobile) acts very different, and therefore deserves different consideration.
I wonder if slave owners said things like, "It's MY property, I can do whatever I want with it?"
You are using a classic device of flawed logic (among others) referred to as "What is, ought to be."
This comes in the statement, "Most likly [sic], you can't (legally) give it to your friend *and* keep it yourself."
Just because the *current* law says that it is not legal to do this, doesn't mean that it's a *good* law. In fact, since we're debating that very law, this is quite inappropriate indeed!
This is the fundamental difference between "information" and your "meat-space". The fact that we can copy information without destroying the original warrants a much different approach to our idea of 'ownership'.
I am surprised that ESR doesn't even understand the basis of the FSF's argument. The GPL and legal remedies are temporary solutions to a bigger problem, that the government allows people and corporations to "own" information. What the FSF is calling for, in the grand scheme of things, is a RELAXATION of regulations -- allowing users to copy and modify so-called intellectual "property" as they see fit, by removing the idea of a government-enforced ownership of information.
So, it is clear to me that the FSF is not asking for a law banning proprietary licenses; rather, they are asking that we do away with the idea of 'license' altogether.
I agree. Though there is probably some amount of overreacting on the government's side, trespassing physically or digitally typically is illegal, regardless of intent.
Snooping around the filesystem "just to make sure" that the system is incorrectly configured sure sounds illegal, though not necessarily immoral, to me.
Sorry to 'me too', but I've seen this several times too. In fact, very recently when posting a piece of source code to a programming-languages discussion article, with the "code" post type set, it complained that I violated the lameness filter. Ugh.
At least the source is available, so it's pretty easy to see what it's doing. =)
This language looks to be the same as everyone else's attempt to make a modern C-like language (ie, Java, C#). What is the point?
For a fast (as fast as C, maybe faster), safe language with some really neat (and probably unfamilar) features, try O'Caml. This will cure your doldroms, and you may never want to go back...
You're thinking of C. Assembly isn't meant to be portable. The idea of writing assembly code is to tune some very efficiency-critical code for a particular platform.
What portable code would you write, which wouldn't be easier (and probably faster, since the compiler could do more optimization) in C? (Or -- god forbid -- a high level language?)
Typically, garbage collection happens when an allocation occurs and no space is available in the heap. I'm not sure how it is typically done in a JVM, but you wouldn't need parallelism or even non-determinism to do it.
Java isn't the language I'd choose to do it, but I threw it out because it has many of the properties that the other, more obscure languages (O'Caml, SML) I'm referring to. Those other languages are much more efficient, though.
I guess what I'm saying is, microkernel in C/ASM, as small as possible -- the implement the rest in a high level language (or many different ones, if your architecture is good).
I don't know how JVM garbage collection is usually done, but there's no reason it would need to be nondeterministic. The garbage collectors I know only run when an allocation is done (and there is not enough room). There are implications for real-time stuff (since an allocation could potentially take a long time because of a collection), but there are incremental collectors which solve this problem.
Anyway, interrupt handling is sensitive to that, for sure. But filesystem code or TCP/IP shouldn't be!
Moving to a high level language certainly wouldn't slow your computer down to the speed of a 486. A highly conservative estimate would be that it is about twice as slow. (Java is pretty inefficient, but O'Caml is literally as fast as C.) Of course, this only applies to kernel stuff, which is not where your computer spends most of its time. But, since it is a higher-level language we get the following interesting benefits:
- faster to write the code, so can spend more time optimizing what matters (and easier to implement more difficult algorithms). This could lead to a faster system, since
- NO MORE BUFFER OVERFLOWS, meaning that it will be way more secure than linux or windows
- More portable
- More modular, meaning that it is easier to extend by people who don't understand the whole system, and more easily managed by those who do
- along with all the other benefits of high-level languages
Admittedly there would be a significant challenge integrating the hardware stuff with the high-level stuff. That's why I said it would be a feat. In other respects, doing programming in advanced high level languages tends to be quite enjoyable!
Even more difficult, though, is convincing slashdot kids that C and lots of eyeballs just doesn't scale well. I think we will have to do this to compete with microsoft in the next decade, so hopefully we will be mature enough to manage it! (Microsoft has hired up a bunch of great programming language researchers, and they are as we speak working on language technologies for their operating systems stuff. As the open source projects and their own projects grow too large to be understood and debugged by humans, machine-checking will become the technology that separates the crashy software from the robust.)
Why do you need pointers to write complicated programs? Some of the bootstrapping and hardware access in a kernel would probably need to be written in C or assembly, but there is a significant amount of code which could be written in any programming language. Pointers in this case would be used simply because C does not provide anything more abstract.
You should learn some more about programming, I think. =)
Java doesn't need to be interpreted.
Anyway, I am thinking more of a minimal microkernel written in C or assembly (at some level you will need to be doing hardware access) but as much as possible of the algorithmic, non-machine specific stuff written in the high level language (ie, TCP-IP, file system, access control, scheduler..)
What crazy reasoning drives a project to write something complicated and difficult in a lower-level language than the current best practice?
The only thing I can think of is the idea that it will be leaner and faster, which are seriously misguided notions given the trend of faster and faster hardware. What we care about now are scalable algorithms, stable and robust kernels and drivers, and appropriate abstractions to allow easy extensions. All of these are made easier by high-level languages. They are made more difficult by machine language.
What I'd like to see is a powerful kernel mostly written in a very high level safe language like O'Caml or even Java. That would be a feat with some important consequences.
> basically the simplest model of a machine
> necessary to compute anything that is
> computable.
As an irrelevant aside, I'd like to claim that the lambda calculus is a more simple ('turing-complete') model of computation than turing machines. (Though the turing machine certainly is simple too.)
Right on. I'll gladly take a safe memory-managed language like Java to write my efficient code, since it means I can spend more time optimizing things which really matter (algorithms).
By the way, there exist languages with the same abstraction qualities as java (safety, garbage collection, portability, etc.) which aren't slow in the sense that the original poster meant. Check out O'Caml, for instance. It's got a lot more interesting features than Java, and runs as fast as C.
There are a *lot* of unix network daemons which are vulnerable, mainly because they tend to be written in C.
Relying on folklore to tell you which services you trust seems pretty sloppy to me; unless you've somehow guaranteed that your services are more secure than the ones listed, I say the worm writers will be the ones laughing.
My feeling is that most of these are Microsoft-based worms because that is the most popular platform. (And perhaps the users are less concerned about computers than we are.) There have been plenty of exploitable holes in pine, for instance; it's just that not enough people use the same version of pine for a successful worm to be built around it.
I think perhaps this is an argument for diversity more than it is an argument against Microsoft.
I successfully went 4 years of undergraduate with only about 50 spams. It's easy to do, just don't publish your e-mail address everywhere. On accounts where I do get a lot of spam, I just delete it. No big deal, and it kills fewer trees than postal mail. It's also easier to automate. Spam that is a scam or illegal deserves to be dealt with using existing consumer-protection laws, but I am opposed to any kind of government regulation of the internet. We have technological measures which are more effective than any legal remedies; I suggest that we use (and continue to develop) them.
And indeed, most do this already.
MD5 might be overkill, but I don't think that creating a pretty accurate fingerprint which would be resistant to extra random characters would be too difficult.
Better make that A200108. What, were you born yesterday?
Since they won't be able to make money simply by selling copies of software (but instead by writing it), they add value to the software when they ship it with the source code. In any case, all it takes is one leaked copy...
The Executive Branch does in fact enforce laws. I don't think it would be too hard for them to do something about it, should they care...
I didn't purport to prove anything...
The GPL is the closest approximation (that we know of) to the lack of copyright we seek; it (ab)uses current copyright law in order to spread and eventually (we hope) make it obsolete. At least, it gets people to think about these issues.
Yes, it is too bad that we have to use copyright law to do this -- but we have to play by the rules of the government we live under.
> It is my property, I can and will choose a license that fits MY needs as a developer.
I think we are saying that it is not your property. In any case, this kind of "property" (as opposed to natural property: physical things like your belongings, home, automobile) acts very different, and therefore deserves different consideration.
I wonder if slave owners said things like, "It's MY property, I can do whatever I want with it?"
This is a terrible analogy.
You are using a classic device of flawed logic (among others) referred to as "What is, ought to be."
This comes in the statement, "Most likly [sic], you can't (legally) give it to your friend *and* keep it yourself."
Just because the *current* law says that it is not legal to do this, doesn't mean that it's a *good* law. In fact, since we're debating that very law, this is quite inappropriate indeed!
This is the fundamental difference between "information" and your "meat-space". The fact that we can copy information without destroying the original warrants a much different approach to our idea of 'ownership'.
I am surprised that ESR doesn't even understand the basis of the FSF's argument. The GPL and legal remedies are temporary solutions to a bigger problem, that the government allows people and corporations to "own" information. What the FSF is calling for, in the grand scheme of things, is a RELAXATION of regulations -- allowing users to copy and modify so-called intellectual "property" as they see fit, by removing the idea of a government-enforced ownership of information.
So, it is clear to me that the FSF is not asking for a law banning proprietary licenses; rather, they are asking that we do away with the idea of 'license' altogether.
"They obfuscate more than they enlighten, they cloud the issues rather than clearing the air."
I say everything twice, repeating what I say a second time.
Perhaps this story would be of interest to the (countless, no doubt) web developers who read slashdot, for whom banner ads are their source of income.
It's ok to not read stories that don't interest you!
I agree. Though there is probably some amount of overreacting on the government's side, trespassing physically or digitally typically is illegal, regardless of intent.
Snooping around the filesystem "just to make sure" that the system is incorrectly configured sure sounds illegal, though not necessarily immoral, to me.
Sorry to 'me too', but I've seen this several times too. In fact, very recently when posting a piece of source code to a programming-languages discussion article, with the "code" post type set, it complained that I violated the lameness filter. Ugh.
At least the source is available, so it's pretty easy to see what it's doing. =)
This language looks to be the same as everyone else's attempt to make a modern C-like language (ie, Java, C#). What is the point?
For a fast (as fast as C, maybe faster), safe language with some really neat (and probably unfamilar) features, try O'Caml. This will cure your doldroms, and you may never want to go back...
http://caml.inria.fr/