So .Net is like C++?
on
Hijacking .NET
·
· Score: 5, Interesting
In Java, the bytecode interpreter makes sure you can't access private class members. This is needed for security - creating the 'sandbox' which is most well-known from applets, and IMHO isn't used enough elsewhere.
OTOH in C++ the public/protected/private distinction is enforced solely by the compiler, and code has full access to the machine.
Obviously in.NET you don't have the same raw hardware access, but it looks like for speed Microsoft omitted to check access qualifiers at run time. But I wonder, is this part of the.NET specifications, or is it just an implementation oversight? Does the same trick work on Mono for example?
For black-and-white images, tic98 beats the pants off compressed PNG. I don't know how it compares to JPEG, but it seems to me that JPEG is unsuitable for typical printed works.
If you are taking the OCRed text and reformatting it, that's a different problem entirely. It is of course essential to OCR the books so that they can be put on the web, grepped and so on. But with storage space being cheap, I think it would be good to preserve the raw scanned images themselves, so that people will be able to study the typography and layout as well as the content.
(I've thought about a super-OCR program that looks at the scanned image and figures out typeface, margin widths, line breaking and spacing decisions and then generates TeX source to re-typeset the book in the same style. That would be very cool (a way to make older books available as decent PDFs without losing the existing formatting) but also very hard to implement well.)
This story is a good opportunity to plug some free software you could use to help digitize books.
Stuart Inglis's tic98 is a lossless compressor designed for black-and-white scanned documents. It achieves better compression ratios than anything else, or at least it did a couple of years ago. If you have scanned documents to make available online, it's fairly simple to write a CGI script to convert tic98 on the fly to PDF.
Hopefully someone else will reply to this comment with a recommendation of good free OCR software.
According to IBM Canada, the Model 30 came with an optional fixed disk of 20 or 39 megabytes. Perhaps a smaller disk was later added as a low-cost option (it seems strange though). Anyway, the Model 60 was intended as a server, with its huge tower case, eight 16-bit MCA slots and two full-height 5.25inch drive bays. (Back then the idea of marketing a 286-based server didn't seem quite as odd as it does now.) So ten megs was certainly too small for that.
Sorry I didn't mean literally that/usr/ is a problem, what I meant was just throwing together a bunch of packages without bothering to change them to work well together. Actually, Red Hat's avoidance of/opt/ is another point in their favour I feel, I agree with the person who said 'There is no optional software on Linux. Let's get rid of/opt/!' It's not really needed if you have a package manager such as RPM.
Yes, Hollywood could learn a lot if they cared to. The skills needed to survive in the harsh Artic conditions, making tough and warm clothing from animal skins, fishing, traditional medicine... perhaps it would be a good idea for some overpaid Hollywood executives to adopt a more humble attitude and see what they have to learn from the Inuit.
Are you sure? The Model 60 shipped with either a 44Mbyte ST506 disk, or a 70Mbyte ESDI disk (larger ESDI drives could also be used, IBM supplied a 110Mbyte unit with the similar Model 80). By 1987 when the PS/2 line was launched, a 10 megabyte disk was hopelessly small.
FWIW, Linux has a driver for these disks (ps2esdi.c) although you would need a 386 box to run it.
I am currently a Mandrake user, but next time I upgrade I will probably go to Red Hat. They seem to be the only distribution making a serious effort to integrate the software they provide, rather than just pulling a bunch of packages off the net and installing them in/usr/. I don't care about ideological purity of 'the KDE environment' or 'the GNOME environment'. What matters is having all the applications work consistently together, and if Red Hat is prepared to kill a few sacred cows to do it, good luck to them.
Operator overloading isn't useful only for numeric computation (defining classes for complex numbers, vectors, matrices, bigints and so on), although it certainly is handy for that. It also has a use for container classes, to give them a syntax that is conciser and closer to that for built-in arrays. 'm["red"] = 5;' is IMHO a lot more readable than 'm.set("red", 5)'.
What's particularly annoying about Java is that if operator overloading is so unnecessary, why do they themselves use it for the String class? If overloading the + operator was good enough for the writers of the standard library, why isn't it good enough to use in writing your own library?
Oh I see there is also 'possible raise the signal offset above DC', in other words use the existing data twisted pairs for power as well. But that would surely break all existing Ethernet devices.
Yeah but hypothetically they'd take the FreeBSD kernel and add the GNU userland to it (probably even glibc). So GNU/BSD would be an appropriate name. I think there is currently some Debian GNU/NetBSD project.
And yes, Tom Christiansen a few years ago tried to start a BSD/Linux project, that is, a Linux distribution without any GNU code. But it was a bit pointless and fizzled out I think.
The moral of the story is, whenever stating any programming rule, always give the reason for it as well. Then people reading the rule later can also check whether the reason is still valid. This applies to all programming language commandments, not just those targeted at performance. It's amazing the number of shops that have fossilized rules from ten or more years ago, the reasons for which are long gone but which still have to be followed anyway although nobody really knows why.
Yes, middle-click always opens the link in a new tab, no matter what HTML code the site has to say otherwise. This is good. But the same consistency should be extended to left-click, so that it always opens links in the same tab.
Thanks for the tip! I still think it should be the default setting though; 'not-annoying by default' is the best principle. (Although perhaps most web users do not share my feeling that opening in a new window is annoying.)
But the site you mention seems to be down: texturize.net redirects to www.texturize.net and there is no such host. Or something like that.
Quite right. It always seemed that the Netscape-branded browsers had a conflict of interest, since Netscape was trying to make money from some half-assed 'portal' at the time. If you want a decent web browser, you have to make sure that the people making it are reasonably well separated from advertisers and don't have any product of their own to sell. The same goes for most other network-connected software of course (imagine if the companies developing email clients were also the same people doing direct marketing; or look at RealPlayer).
I might agree with you, and fight some rearguard action against the misuse of 'enterprise' by marketroids, but frankly I think it's a losing battle. Besides, as you point out, an enterprise is just a business, so even if we did get back the original, non-dotcom-bust-tainted meaning of the word, it wouldn't give anything extra we don't already have by saying 'business', 'company' or 'corporation'. So let the idiots have their word to play with. I'd rather talk about 'Linux in a business environment' or 'Linux in large companies'.
Much more serious are possible changes in meaning of words like 'innovation', which really would be a loss to the language.
The Mozilla Firebird developers seem to be the first mainstream developers to finally realize that a browser doesn't have to follow every stupid thing that a 'web designer' dictates. A browser does not have to pop up moronic Javascript windows just because the site says so. It doesn't have to allow the site to obscure the status bar just because the site wants to. If the Javascript specification allows these things, well then the spec is broken and it's right for the browser to ignore it and do (by default) what the _user_ is most likely to want. Font resizing that always works is another instance of this.
(One more thing I wish they would fix, however, and that is links that open in a new window. It shouldn't be up to the web site to control opening new windows in the user's browser, it's confusing to the novice (as Nielsen points out) and annoying to many experienced users. The default browser settings, IMHO, ought to open all links in the same window and let the user choose whether to do something different by middle-clicking instead of left-clicking. I hope the Firebird people can fix this one remaining annoyance in a future release.)
The word 'enterprise' doesn't really mean anything, it is just a magic word uttered by marketers because it has a positive effect on other marketers, PHBs and general timewasters. Whatever meaning it once did have has been squeezed out. In general, any product with 'enterprise' in the title is to be avoided (just like any Microsoft feature called 'smart').
So no point arguing about what exactly 'enterprise' means. Let those who want to use it use it, and the rest of us can continue speaking English as before.
Hmm. But is this part of the Freenet client, or part of the protocol? If I felt like being antisocial, could I grab the Freenet client source and alter it so that only certain data was allowed to pass through my node (perhaps leeching as much as possible for myself but not giving anything back)? Or is the data always encrypted end-to-end somehow, so that the nodes in the middle are unaware of what they send and couldn't stop propagating the worm's code even if they wanted to? (Short of disconnecting from Freenet altogether.)
The trouble is that the USA does not necessarily pay for damage caused to other countries by burning fossil fuels. If increased CO2 output causes some Pacific islands to disappear, the countries responsible have no obligation to pay the islanders. Nor do the islanders have any right to be consulted before the CO2 is produced. Of course all countries are affected by global warming, just some more than others and the islands worse than most.
(s/USA/other industrialized country/ as appropriate)
You are quite right though, if the USA wants to use up its natural resources at a faster rate than other countries (perhaps because it has more of them), that is nobody else's business. Nor it is anyone else's business if some other country chooses to trade with the USA and exchange raw materials for other goods and services. The difficulty comes only when such actions damage the global environment and affect other countries. Although the USA itself certainly has something to lose from an increase in hurricanes and extreme weather patterns.
In Java, the bytecode interpreter makes sure you can't access private class members. This is needed for security - creating the 'sandbox' which is most well-known from applets, and IMHO isn't used enough elsewhere.
.NET you don't have the same raw hardware access, but it looks like for speed Microsoft omitted to check access qualifiers at run time. But I wonder, is this part of the .NET specifications, or is it just an implementation oversight? Does the same trick work on Mono for example?
OTOH in C++ the public/protected/private distinction is enforced solely by the compiler, and code has full access to the machine.
Obviously in
For black-and-white images, tic98 beats the pants off compressed PNG. I don't know how it compares to JPEG, but it seems to me that JPEG is unsuitable for typical printed works.
If you are taking the OCRed text and reformatting it, that's a different problem entirely. It is of course essential to OCR the books so that they can be put on the web, grepped and so on. But with storage space being cheap, I think it would be good to preserve the raw scanned images themselves, so that people will be able to study the typography and layout as well as the content.
(I've thought about a super-OCR program that looks at the scanned image and figures out typeface, margin widths, line breaking and spacing decisions and then generates TeX source to re-typeset the book in the same style. That would be very cool (a way to make older books available as decent PDFs without losing the existing formatting) but also very hard to implement well.)
What about the scene in 'Short Circuit' (or was it the sequel) where Johnny Five is speed-reading all the books in the library?
Mmm, IN-PUT!
This story is a good opportunity to plug some free software you could use to help digitize books.
Stuart Inglis's tic98 is a lossless compressor designed for black-and-white scanned documents. It achieves better compression ratios than anything else, or at least it did a couple of years ago. If you have scanned documents to make available online, it's fairly simple to write a CGI script to convert tic98 on the fly to PDF.
Hopefully someone else will reply to this comment with a recommendation of good free OCR software.
Does it run Linux?
According to IBM Canada, the Model 30 came with an optional fixed disk of 20 or 39 megabytes. Perhaps a smaller disk was later added as a low-cost option (it seems strange though). Anyway, the Model 60 was intended as a server, with its huge tower case, eight 16-bit MCA slots and two full-height 5.25inch drive bays. (Back then the idea of marketing a 286-based server didn't seem quite as odd as it does now.) So ten megs was certainly too small for that.
Sorry I didn't mean literally that /usr/ is a problem, what I meant was just throwing together a bunch of packages without bothering to change them to work well together. Actually, Red Hat's avoidance of /opt/ is another point in their favour I feel, I agree with the person who said 'There is no optional software on Linux. Let's get rid of /opt/!' It's not really needed if you have a package manager such as RPM.
Yes, Hollywood could learn a lot if they cared to. The skills needed to survive in the harsh Artic conditions, making tough and warm clothing from animal skins, fishing, traditional medicine... perhaps it would be a good idea for some overpaid Hollywood executives to adopt a more humble attitude and see what they have to learn from the Inuit.
Are you sure? The Model 60 shipped with either a 44Mbyte ST506 disk, or a 70Mbyte ESDI disk (larger ESDI drives could also be used, IBM supplied a 110Mbyte unit with the similar Model 80). By 1987 when the PS/2 line was launched, a 10 megabyte disk was hopelessly small.
FWIW, Linux has a driver for these disks (ps2esdi.c) although you would need a 386 box to run it.
I am currently a Mandrake user, but next time I upgrade I will probably go to Red Hat. They seem to be the only distribution making a serious effort to integrate the software they provide, rather than just pulling a bunch of packages off the net and installing them in /usr/. I don't care about ideological purity of 'the KDE environment' or 'the GNOME environment'. What matters is having all the applications work consistently together, and if Red Hat is prepared to kill a few sacred cows to do it, good luck to them.
Operator overloading isn't useful only for numeric computation (defining classes for complex numbers, vectors, matrices, bigints and so on), although it certainly is handy for that. It also has a use for container classes, to give them a syntax that is conciser and closer to that for built-in arrays. 'm["red"] = 5;' is IMHO a lot more readable than 'm.set("red", 5)'.
What's particularly annoying about Java is that if operator overloading is so unnecessary, why do they themselves use it for the String class? If overloading the + operator was good enough for the writers of the standard library, why isn't it good enough to use in writing your own library?
Oh I see there is also 'possible raise the signal offset above DC', in other words use the existing data twisted pairs for power as well. But that would surely break all existing Ethernet devices.
It's not power-over-Ethernet, it's power-over-twisted-pair. The only connection with Ethernet is sharing the same plug.
Yeah but hypothetically they'd take the FreeBSD kernel and add the GNU userland to it (probably even glibc). So GNU/BSD would be an appropriate name. I think there is currently some Debian GNU/NetBSD project.
And yes, Tom Christiansen a few years ago tried to start a BSD/Linux project, that is, a Linux distribution without any GNU code. But it was a bit pointless and fizzled out I think.
If SCO is right, and if SCO manages to prevail in court, then expect to see 'Red Hat FreeBSD' fairly quickly.
The moral of the story is, whenever stating any programming rule, always give the reason for it as well. Then people reading the rule later can also check whether the reason is still valid. This applies to all programming language commandments, not just those targeted at performance. It's amazing the number of shops that have fossilized rules from ten or more years ago, the reasons for which are long gone but which still have to be followed anyway although nobody really knows why.
Yes, middle-click always opens the link in a new tab, no matter what HTML code the site has to say otherwise. This is good. But the same consistency should be extended to left-click, so that it always opens links in the same tab.
Thanks for the tip! I still think it should be the default setting though; 'not-annoying by default' is the best principle. (Although perhaps most web users do not share my feeling that opening in a new window is annoying.)
But the site you mention seems to be down: texturize.net redirects to www.texturize.net and there is no such host. Or something like that.
Quite right. It always seemed that the Netscape-branded browsers had a conflict of interest, since Netscape was trying to make money from some half-assed 'portal' at the time. If you want a decent web browser, you have to make sure that the people making it are reasonably well separated from advertisers and don't have any product of their own to sell. The same goes for most other network-connected software of course (imagine if the companies developing email clients were also the same people doing direct marketing; or look at RealPlayer).
I might agree with you, and fight some rearguard action against the misuse of 'enterprise' by marketroids, but frankly I think it's a losing battle. Besides, as you point out, an enterprise is just a business, so even if we did get back the original, non-dotcom-bust-tainted meaning of the word, it wouldn't give anything extra we don't already have by saying 'business', 'company' or 'corporation'. So let the idiots have their word to play with. I'd rather talk about 'Linux in a business environment' or 'Linux in large companies'.
Much more serious are possible changes in meaning of words like 'innovation', which really would be a loss to the language.
The Mozilla Firebird developers seem to be the first mainstream developers to finally realize that a browser doesn't have to follow every stupid thing that a 'web designer' dictates. A browser does not have to pop up moronic Javascript windows just because the site says so. It doesn't have to allow the site to obscure the status bar just because the site wants to. If the Javascript specification allows these things, well then the spec is broken and it's right for the browser to ignore it and do (by default) what the _user_ is most likely to want. Font resizing that always works is another instance of this.
(One more thing I wish they would fix, however, and that is links that open in a new window. It shouldn't be up to the web site to control opening new windows in the user's browser, it's confusing to the novice (as Nielsen points out) and annoying to many experienced users. The default browser settings, IMHO, ought to open all links in the same window and let the user choose whether to do something different by middle-clicking instead of left-clicking. I hope the Firebird people can fix this one remaining annoyance in a future release.)
The word 'enterprise' doesn't really mean anything, it is just a magic word uttered by marketers because it has a positive effect on other marketers, PHBs and general timewasters. Whatever meaning it once did have has been squeezed out. In general, any product with 'enterprise' in the title is to be avoided (just like any Microsoft feature called 'smart').
So no point arguing about what exactly 'enterprise' means. Let those who want to use it use it, and the rest of us can continue speaking English as before.
Hmm. But is this part of the Freenet client, or part of the protocol? If I felt like being antisocial, could I grab the Freenet client source and alter it so that only certain data was allowed to pass through my node (perhaps leeching as much as possible for myself but not giving anything back)? Or is the data always encrypted end-to-end somehow, so that the nodes in the middle are unaware of what they send and couldn't stop propagating the worm's code even if they wanted to? (Short of disconnecting from Freenet altogether.)
The trouble is that the USA does not necessarily pay for damage caused to other countries by burning fossil fuels. If increased CO2 output causes some Pacific islands to disappear, the countries responsible have no obligation to pay the islanders. Nor do the islanders have any right to be consulted before the CO2 is produced. Of course all countries are affected by global warming, just some more than others and the islands worse than most.
(s/USA/other industrialized country/ as appropriate)
You are quite right though, if the USA wants to use up its natural resources at a faster rate than other countries (perhaps because it has more of them), that is nobody else's business. Nor it is anyone else's business if some other country chooses to trade with the USA and exchange raw materials for other goods and services. The difficulty comes only when such actions damage the global environment and affect other countries. Although the USA itself certainly has something to lose from an increase in hurricanes and extreme weather patterns.