- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The point is that it is LOWER level than a lot of other languages (e.g. the languages commonly used by the majority of people here, and in general, the majority of people worldwide, Java, C# and a variety of bullshit web related languages).
Given the audience, it is appropriate to use the word low, because C is definitely lower than anything they've ever seen, with the probable exception of some assembler they once saw on a colleagues desk which made them poo themselves with its intimidating impenetrability.
Admin
Admin
Admin
Admin
The idea of security requires an OS to initialize pages to 0, or initialize pages to random numbers, etc. The idea of debugging requires a C implementation to initialize pages to something that wouldn't be expected by a careless programmer. But the C standard doesn't require such useful features.
C was invented as a low level language. But the way the standard is worded, standard C became a high level language. Not very high, just enough to stop being low level where it was needed.
Admin
Also it's not the size that matters, it's what gets caught handled.
Admin
@VinDuv Don't confuse storage duration with linkage. Here's a quote I pulled from the C11 standard, for your benefit:
An object whose identifier is declared without the storage-class specifier _Thread_local, and either with external or internal linkage or with the storage-class specifier static, has static storage duration. Its lifetime is the entire execution of the program and its stored value is initialized only once, prior to program startup.
Admin
Someone has already mentioned Lisp machines in this comments section... Just how much LOWER level is Lisp than C?
Consider that there are also chipsets that make execution of Java bytecode possible, without a software Java VM; The bytecode is processed by the CPU! Doesn't this make Java LOWER level than C?
What I want to know is, on the Lisp machine, which is LOWER level: Java or C?
A low level programming language is a programming language with very few abstractions from a specific architectures instruction set. Java was designed, like Lisp, C, C# and many other programming languages, to be portable. They're defined by standards, absent of any actual architecture.
Having said that, there are some architectures that happen to implement one these programming languages as low level, in their context only. That doesn't impact at all upon the discussion in the general context.
In the general context, Intel x86 assembly is not portable, though it is considered low level. Which is LOWER level: Lisp, Java or x86? Why is that? If I were to develop a virtual machine to emulate x86 on a PPC, would it still be low level? Why? Think about the definition of "low level" for a moment...
It doesn't make sense to use the term low level in any capacity to describe a portable programming language. They are all high level, because they're described by standards absent of any actual architectures. Similarly, it doesn't make sense to use the term absolute zero to describe any temperature greater than 0°K... "But 0°F is absolute zeroer than 0°C", is what you're telling me... and it makes no sense!
Admin
Based on some of the articles I read here...not really.
I like the ideas of Java and C#, but the implementations of them, not so much. The lack of an unsigned integer type in Java gave me some grief when trying to decode and display DTED files on one project. Java and C# eliminate several classes of bugs found in C and C++, but introduce whole new classes of bugs in the bargain. Not a net win, in my opinion.
And as someone who got his CS degree in the '80s, the whole argument over kilo/kibi and mega/mibi isn't just silly, it's tiresome. Whether you're using 2^10 vs 10^3 is usually clear from context. "Mega" is especially overloaded in everyday conversation; I doubt anyone argues about whether "megavitamins" contain 1000000 or 1048576 times the content of regular vitamins.
Most of us are smart people, and can translate between units. No, we shouldn't have to, but that ship sailed a long time ago.
Admin
Actually, it is EXACTLY for marketing reasons alone. Back in the day, hard drives were advertised based on their Base 2 capacities. For instance, Seagate advertised the ST-419 as a 15 megabyte drive. Once formatted, nominal capacity was 15,980,544 bytes (minus a little bit if there were bad sectors on the label that you had to key in.) That's 15,606KB or 15.24 "MiB". Similarly, 360KB floppy disks had a formatted capacity of 362,496 bytes.
It wasn't until some hard drive manufacturer couldn't quite reach the big one point oh that they redefined the industry standard terminology so they could market their 953 megabyte drive as "one gigabyte."
While that mentality has started to creep into other areas (cough, networking), you'll notice that a gigabyte of RAM is still 1,073,741,824 bytes.
Admin
Admin
Hey; it works on my machine!!!
Admin
And here I was thinking that multiplication was commutative. Silly me...
Admin
I'm Johnny come lately as usual, and as usual TRWTF is 4 pages of comments talking about MB vs MiB.
Let's assume 1. this embedded device needed to be delivered in a hurry to perform some menial and well defined task; 2. the data occupies the table not too sparsely (not too evenly distributed); 3. the data is not on the stack (although that probably wouldn't matter much either). 4. MMU present, reasonably standard configured Linux, etc. 5. The array is not initialized or touched until it's loaded with data from the USB stick 6. This code does indeed load and execute on the device. All reasonable assumptions according to the story.
I'm not a complete authority here, but as mentioned by a mere few here, the Linux kernel will allocate a good 4GB of address space for you to work with, regardless of how much physical RAM is available, actually pulling it from the 32MB in 4k chunks as needed. If Linux starts running out of physical memory, it'll simply sleep your process hoping some other process eventually frees up a 4k chunk it can give to your process.
The only thing that's suspect here to me is that if the array has to be that huge, then the data is probably being put into it sparsely, and you'll ask for a lot of 4k chunks. Again, if it's not a mission critical embedded device and it's been tested and works, and has to be delivered like right-freakin'-yesterday, then I might do the same.
Admin
Admin
I know nothing about QBASIC. But vaguely remember reading the docs on an older version of basic where they mentioned you could define a sparse array type. So yeah it could handle an array that was 100X100X100X100X100X100X100 in a 96k address space no problem. Iterating through it would be a problem since that old machine would still be working probably.
Admin
The abbreviation for the kelvin is K, not °K. As for temperature, let's agree on -40°.
Admin
SWIFT Interview questions on
http://testwithus.blogspot.in/p/swift.htm
For selenium solution visit http://testwithus.blogspot.in/p/blog-page.html
QTP Interview Questions. http://testwithus.blogspot.in/p/qtp-questions.html
Admin
Um... my unit converter says 1km^2 = 1e12 mm^2. One square kilometer is a square one million millimeters on a side. Where did you get 696,200 from?
Admin
Gotta follow the discussion. This whole subject has been about the land area of Texas compared to the size of a flea (hence converting to mm) -- Texas is approximately 696,200 square kilometers.
Admin
A flea that size would also weigh approximately 1 million metric tons (estimated based on a square flea composed entirely of water, then rounded down. Call if 500,000 metric tons, even, that's still a whole heck of a lot.
Admin
Admin
No. A gigabyte of RAM (as is a gigabyte of anything) is exactly 1,000,000,000 bytes.
It's unfortunate that products are sometimes mislabeled, but that doesn't affect gigabyte in any way.
Admin
if you approach it from the angle that the more you know about Java and its ecosystem, it reduces from thounsands of wtf's into just one: WTF are some apes so hyped up wrt. this pile of crap ???
Admin
No, they're not. C is a language defined in the context of an abstract (keyword: abstract) machine.
When a processor that supports x86 protected mode is powered on, it begins executing instructions in real mode, in order to maintain backwards compatibility with earlier x86 processors. How many C implementations do you know that require switching from real mode to protected mode before they can make use of more than 1MB of memory?
Very few. Even if a C implementation were built to run the moment control is passed over by the BIOS, the implementation would most likely handle this for you, much like most OSes would. In addition to this task, OSes that implement C tend to implement paging and virtual address spaces. When your C program modifies the value (say, in an array) pointed to by the virtual address 0x2000000, your OS translates that virtual address to a physical address...
TRWTF is using "C" and "low-level" in the same sentence.