Just to note, I agree that stopping the application in mid-run, changing it, and continue running is impressive. But MS (the only one I know of, at least) has achived it quite a long time ago for C/C++ (much more impressive, I think you'll agree) and for.NET
Really? All you've to do is put the ftp's adress on explorer's adress bar, and it will work. The interface is the same as if you are browsing your own files.
But yes, it would be nice if you could do it. The driver wouldn't be for common OS, but rather would confrom to UDI. Universal Driver Interface. On startup the OS would extract the driver from ROM, check that it has no updated version installed, and load the driver from ROM/HD (if there is updated version).
I thought that Apple would be among the first to update their Java. After all, there was all the noise about Mac OSX's Java being the fastest, IIRC, they changed the OS so it would run faster.
No, actually that is the other way around. *nix is the one that doesn't use segmentation much, while MS used to use it pretty heavily in the past up until ME, I think.
The difference is in terminoogy, *nix usually calls it seg fault, MS calls it illegal operation, which is actually the more correct term.
typdef void (*f)(void); int main() {
f func = 0;
func();
return 0; }
That was a really creepy story. I read it some 6 - 8 years ago, and I can still remember it, that means something. BTW, it's not exactly AI, it'd develop to god-like style thingie. In the end, one person kills the other, and the AI make it into something that can't kill itself, so it can amuse itself.
As dakoda pointed out, it's not *that* easy. It's not biggie, but it's a matter of sitting down and watching disassembled code, not fun on best of circumstances. There is also the legal view, in which it's probably wrong, but that is another matter.
Well, naturally. The point is that you can more or less see where the function that does this checking is. Then just replace the call. It's not fun, of course, but it's not much trouble and has to be done only once, then it's a matter of patching a few bytes in the executable. That is the reason why most applications are so easy to crack.
> String.valueOf(5.5f); >What interfaces? String already has valueOf() functions for all primitive types.
That is bad coding practice. It's nice and easy, but it's not good to do so. The reasoning? Simple. Why you have String.valueOf(Int) and not String.valueOf(SomeCustomClass) ? Using this method puts the responability for translating the object to string representation in the hands of the String class. It should be the responsability of the objects to supply it. String.valueOf() shouldn't exist. Or should exist in this form: string string.valueOf(object Obj) {
return Obj.ToString(); } The above won't work on Java, because of the primitive system it uses, but it would work just fine on.NET/C#. You are going to argue that this is (probably) possible in Java, with one method for object, and overloads for all the primitive types. The problem here is when you want to add a new primitive type, say Complex. You *can't* do that without adding a new method to String, and to any other class that wants to be able to handle all types in Java.
> If my String idea was used you could write it: > int a = some_string.intValue();
This is even worse, mind you. There is no justification for such an abomination in the interface. This has *no* place here, it should be, as it is, in the Integer class.
Wrong and wrongheaded, dude. You don't want to allienate the hardware manufacterer. Just make sure that any and all new drivers for Windows will have to use UDI, that should make it possible to work on multiply OS.
Floats are easy. You can only have one period in a floating point number, so you consider every number with a period in it as a double, and treats the second period as a serperator. The following compiles perfectly on C#: 5.5f.ToString();//Float to string 5.5.ToString();//Doublt to string
As for the reverse, it's not String's place to have convertors in its interfaces. Each and every type should supply its own. On C#, it's as easy as: int a = Int.Parse(some_string);
> Lord God NO! Don't you EVER use C++ templates as an example of generics again. C++ templates are an attrocity. What you want is generic methods with multiple-dispatch. Look at Lisp's CLOS, or Dylan.
How about Ada's Dynamic Dispatch method?
> How can you write a Non-OO program in a Pure-OO language?
Pretty easily, there are some FORTRAN programs out there written in LISP, you know.
a> I believe it'll be C#, as MS is supposedly moving their application development to C#. b> IIRC, Netscape tried to move large portions of their browser to Java, that made a lot of bussiness sense considerring that they had so many platform to support. They pulled that back after having a lot of problems. c> Off-handedly, I can't recall any feature of C++ that makes it closer to the hardware than Java (the language, not the platform). Is there a concerate reason why Java can't be used to build a kernel? Of course you would need to provide a delete/free(), because GC inside a kernel is *very* bad idea. but aside from that?
i++;// add one to i for (i=0;i10;i++)//loop 10 times, the i10 is there because we start from zero...
Those kind of comments are reduntant, always when you can, let the code do the commenting for you.
ThreadArray[Index].Suspend();
Comments should be for the why, not the how.
And there is always the fun stuff when the comments are out-dated, which happens a lot more than most people realize. There isn't anything as nice as trying to understand code which has out-dated/misleading/outright worng comments.
Actually, Israel population is over 6 millions, nearly all of them speaks hebrew, large numbers of them don't speak english, certainly not to any degree that would allow them to use a program in English.
There is a Office in hebrew, and it's very good. The problem that there are very few Macs in Israel, so I would imagine that the market-share of Mac-owners that needs hebrew support is very few, especially considerring that those *would* likely to know english.
Re:Hate it! (Score:2) by Ayende Rahien on 17/06/02 13:08 (#3714251) (User #309542 Info) What did we say about never getting it right the first time?
Here is the version that works.
//Assumes, str is null terminated. void revStr(char *str) { int start=0/*forgot to do this before*/,end=strlen(str); char tmp; do { tmp = str[start]; str[start]= str[end]; str[end] = tmp; }while (++start </*using != will work, but will segfault on string with len of 1*/ --end); }
To give you the usual Open Source answer: I've yet to find the program that require it that I can't live without.
Just to note, I agree that stopping the application in mid-run, changing it, and continue running is impressive. .NET
But MS (the only one I know of, at least) has achived it quite a long time ago for C/C++ (much more impressive, I think you'll agree) and for
There are enough public FTP servers out there, not to mention that IIS has FTP server, so it's not a problem.
> legacy 32-bit
ROTFLMAO
> You can't have cleaner interface to a partition than seeing it as a continuous memory block
Maybe, but it takes exactly fifteen minutes to do:
read_partition(unsigned long start, unsigned long length, char * buffer);
write_partition(unsigned long start, unsigned long length, char * buffer);
Which gives you just as clean interface, if at the cost of a few more calls.
No, still micro-kernel, even if the GUI run in kernel space.
Really?
All you've to do is put the ftp's adress on explorer's adress bar, and it will work.
The interface is the same as if you are browsing your own files.
But yes, it would be nice if you could do it.
The driver wouldn't be for common OS, but rather would confrom to UDI.
Universal Driver Interface.
On startup the OS would extract the driver from ROM, check that it has no updated version installed, and load the driver from ROM/HD (if there is updated version).
I thought that Apple would be among the first to update their Java.
After all, there was all the noise about Mac OSX's Java being the fastest, IIRC, they changed the OS so it would run faster.
No, actually that is the other way around.
*nix is the one that doesn't use segmentation much, while MS used to use it pretty heavily in the past up until ME, I think.
The difference is in terminoogy, *nix usually calls it seg fault, MS calls it illegal operation, which is actually the more correct term.
typdef void (*f)(void);
int main()
{
f func = 0;
func();
return 0;
}
Should gives this error.
That was a really creepy story.
I read it some 6 - 8 years ago, and I can still remember it, that means something.
BTW, it's not exactly AI, it'd develop to god-like style thingie.
In the end, one person kills the other, and the AI make it into something that can't kill itself, so it can amuse itself.
Don't know about you, but I've a + sign on *my* keyboard.
(Far, far away for the rest of the keyboard, of course.)
What about using an hiercial DB? They *are* the most efficent kind, in all terms.
As dakoda pointed out, it's not *that* easy.
It's not biggie, but it's a matter of sitting down and watching disassembled code, not fun on best of circumstances.
There is also the legal view, in which it's probably wrong, but that is another matter.
Well, naturally.
The point is that you can more or less see where the function that does this checking is.
Then just replace the call.
It's not fun, of course, but it's not much trouble and has to be done only once, then it's a matter of patching a few bytes in the executable.
That is the reason why most applications are so easy to crack.
Why are you going to all this trouble?
:
You get the code, you disassemble it, you find a line that looks like this:
call AllowedToView ; Copy Right Management function
You replace it with a this
call true ; always return true
And you are done.
> String.valueOf(5.5f);
.NET/C#.
>What interfaces? String already has valueOf() functions for all primitive types.
That is bad coding practice. It's nice and easy, but it's not good to do so.
The reasoning? Simple.
Why you have String.valueOf(Int) and not String.valueOf(SomeCustomClass) ?
Using this method puts the responability for translating the object to string representation in the hands of the String class. It should be the responsability of the objects to supply it.
String.valueOf() shouldn't exist.
Or should exist in this form:
string string.valueOf(object Obj)
{
return Obj.ToString();
}
The above won't work on Java, because of the primitive system it uses, but it would work just fine on
You are going to argue that this is (probably) possible in Java, with one method for object, and overloads for all the primitive types.
The problem here is when you want to add a new primitive type, say Complex.
You *can't* do that without adding a new method to String, and to any other class that wants to be able to handle all types in Java.
> If my String idea was used you could write it:
> int a = some_string.intValue();
This is even worse, mind you.
There is no justification for such an abomination in the interface.
This has *no* place here, it should be, as it is, in the Integer class.
Wrong and wrongheaded, dude.
You don't want to allienate the hardware manufacterer.
Just make sure that any and all new drivers for Windows will have to use UDI, that should make it possible to work on multiply OS.
http://www.rosettaproject.org:8080/live/technology
Thanks, but I'll take a more stable approach.
class Blat
{
static int a;
static float b;
public static void main(int argc, string[] argv)
{
a = 5;
b = a * 2.5;
foo();
bar();
return a;
}
private static void foo()
{
}
private static void bar()
{
}
}
Are you willing to be on it? Here is a program that might as well be taken from plain C code.
It's got global variables, too, just for spite.
Floats are easy.
You can only have one period in a floating point number, so you consider every number with a period in it as a double, and treats the second period as a serperator.
The following compiles perfectly on C#:
5.5f.ToString();//Float to string
5.5.ToString();//Doublt to string
As for the reverse, it's not String's place to have convertors in its interfaces.
Each and every type should supply its own.
On C#, it's as easy as:
int a = Int.Parse(some_string);
> Lord God NO! Don't you EVER use C++ templates as an example of generics again. C++ templates are an attrocity. What you want is generic methods with multiple-dispatch. Look at Lisp's CLOS, or Dylan.
How about Ada's Dynamic Dispatch method?
> How can you write a Non-OO program in a Pure-OO language?
Pretty easily, there are some FORTRAN programs out there written in LISP, you know.
a> I believe it'll be C#, as MS is supposedly moving their application development to C#.
b> IIRC, Netscape tried to move large portions of their browser to Java, that made a lot of bussiness sense considerring that they had so many platform to support. They pulled that back after having a lot of problems.
c> Off-handedly, I can't recall any feature of C++ that makes it closer to the hardware than Java (the language, not the platform). Is there a concerate reason why Java can't be used to build a kernel? Of course you would need to provide a delete/free(), because GC inside a kernel is *very* bad idea. but aside from that?
i++;// add one to i
for (i=0;i10;i++)//loop 10 times, the i10 is there because we start from zero...
Those kind of comments are reduntant, always when you can, let the code do the commenting for you.
ThreadArray[Index].Suspend();
Comments should be for the why, not the how.
And there is always the fun stuff when the comments are out-dated, which happens a lot more than most people realize.
There isn't anything as nice as trying to understand code which has out-dated/misleading/outright worng comments.
Actually, Israel population is over 6 millions, nearly all of them speaks hebrew, large numbers of them don't speak english, certainly not to any degree that would allow them to use a program in English.
There is a Office in hebrew, and it's very good.
The problem that there are very few Macs in Israel, so I would imagine that the market-share of Mac-owners that needs hebrew support is very few, especially considerring that those *would* likely to know english.
forgot to set it to code style.
/*using != will work, but will segfault on string with len of 1*/ --end);
Damn!
Re:Hate it! (Score:2)
by Ayende Rahien on 17/06/02 13:08 (#3714251)
(User #309542 Info)
What did we say about never getting it right the first time?
Here is the version that works.
//Assumes, str is null terminated.
void revStr(char *str)
{
int start=0/*forgot to do this before*/,end=strlen(str);
char tmp;
do
{
tmp = str[start];
str[start]= str[end];
str[end] = tmp;
}while (++start <
}