Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 October 10

From Wikipedia, the free encyclopedia
Computing desk
< October 9 << Sep | October | Nov >> October 11 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 10

[edit]

What's the difference between a compiler and an interpreter?

[edit]

hello all...i'm having a problem in knowing Whats the difference between a compiler and an interpreter exactly. whats the main difference ?117.204.2.193 (talk) 12:14, 10 October 2010 (UTC)[reply]

For a language L, an interpreter is a program that executes a program in L. A compiler translates a program in L into some other language. Often, compilers translate programs into machine code, so that the machine can directly execute them, but some compilers just translate programs into a (usually) lower-level language for which a good interpreter or compiler already exists.

Could you please elaborate.117.204.1.96 (talk) 13:56, 10 October 2010 (UTC)[reply]

At this point it looks as if you might be interested in reading WP:HOMEWORK. Of course, if you have any specific further questions you are welcome to ask them. Hans Adler 14:05, 10 October 2010 (UTC)[reply]
The best explanation of this I've been able to spot is in the source code article, near the top. Our other relevant articles are unfortunately pretty technical. Looie496 (talk) 16:09, 10 October 2010 (UTC)[reply]
In general, compiled code uses the instruction set architecture of the CPU that it runs on. Interpreted code does not; it is translated by another program, the interpreter, that does use the machine's ISA. The distinction has gotten blurrier, of course, as machine instruction sets have become so sophisticated that they are often interpreted at the hardware level - see microcode. (As such, it is not always clear whether an implementation of a CPU's instruction set architecture is actually a machine-instruction or a software-emulation provided by a language's system-library, the platform's operating system, the CPU firmware, or some other abstraction-layer). But loosely, a compiled language runs "on the metal" - the binary codes in the compiled file directly correspond to "settings for switches" in the circuitry of the electronic computer that will run the program. An interpreted program does not directly contain "settings for switches." The contents of a program-file in an interpreted language contain a high-level instruction set, which is processed and decoded in real-time by another program. It used to be the case that compiled programs were "invariably" faster than interpreted programs. So in 1990, you would write perl (an interpreted language) only if the benefits outweighed the performance hit compared to C. Because computers, software, and instruction-sets are so complicated now (in 2010), this general rule is not always true; interpreters can be smarter than compilers in some cases and may actually run the same algorithm faster than a compiled program. (Most notably, intelligent software branch prediction, dynamic code profiling, and cache-aware prefetching make this sort of improvement possible - and though these improvements could be made in compiled code, they are often too platform-specific to do well). Languages like Java specify a virtual machine, which again blurs the line between compiler and interpreter; on some machine architectures a Java VM is a true compiler; and on others, it is a true interpreter; and on still others, the Java implementation decides at compile-time whether to act as a compiler or an interpreter (selecting the option with the best performance for some particular code). Nimur (talk) 16:45, 10 October 2010 (UTC)[reply]
Traditionally, interpreters parsed the source code as it was running, executing routines in a 1:1 correspondence with the statements in the source code. A traditional compiler, on the other hand, had a separate "compilation" stage, where the source code was parsed and turned into machine code (the instructions that directly runs on the processor) some time (perhaps months) before the program was run. In recent years, however, this distinction has become more fuzzy, as a large number of languages now use bytecode compiling, where a program is compiled to "bytecode", an instruction set for a theoretical processor which does not have a 1:1 correspondence with the source code, but doesn't match a physical processor either. This has been extended to just-in-time compilation where the translation to bytecode (and then from bytecode to native machine instructions) happens dynamically as the program is executing. To confuse things further, most common modern processors use microcode, where the processor chip doesn't directly execute the machine code instructions it receives, but instead translates them internally into a different instruction set on which it operates. -- 174.24.199.14 (talk) 17:53, 10 October 2010 (UTC)[reply]

http post disabled

[edit]

I need a proxy with HTTP POST disabled. The reason for this is that I only want to read pages on a particular site, but every proxy I have tried has been previously used by other people to post things and thus been blocked from the site, so when I try to read a page I just get a banned message. Does any such proxies exist? I've tried searching desperatly but I can't find any. They must have http post disabled 124.84.247.143 (talk) —Preceding undated comment added 15:39, 10 October 2010 (UTC).[reply]

It's irrelevant whether POST is disabled. The problem is that the proxies you are visiting have been banned from the websites you are seeking. A server administrator can ban a proxy (or any other client) for any reason they want - whether POST is enabled or not. (Besides, "HTTP POST" seems like the least disruptive thing people do with anonymous connections - despite what you may have heard, this is probably not the reason the proxies have been blocked). Open proxy servers have a bad reputation, so many reputable server-operators block all of them without concern or consideration. Have you considered purchasing your own proxy? Have you considered using Tor (anonymity network)? How about accessing your websites from a public place like a web cafe or a library? Your workplace, university, or friends may be able to provide you with a proxy-server. In general, though, proxy servers are not public; and if you're looking for an open proxy for the purposes of preserving anonymity, you are better off using Tor; if you're looking for a proxy for some technical purposes (circumventing firewalls, performance/caching, ...), you are better off purchasing one of your own and administering it yourself. Nimur (talk) 16:32, 10 October 2010 (UTC)[reply]
No, all the proxies I have tried have been banned for things like "spamming" or "posting off topic threads" etc, they are not blanket proxy bans. So finding a fast proxy with HTTP POST disabled would let me read the site. I tried Tor but it's painfully slow and also banned. I don't care about anonymity I just want to read pages 124.84.247.143 (talk) 18:34, 10 October 2010 (UTC)[reply]
Why do you then need a proxy at all? Roger (talk) 19:01, 10 October 2010 (UTC)[reply]
Because this public computer is also blocked from reading the site 124.84.247.143 (talk) 19:29, 10 October 2010 (UTC)[reply]
What site is it? 87.113.56.9 (talk) 19:43, 10 October 2010 (UTC)[reply]
I hope the OP does understand that a user can "post" to a forum using only HTTP GET method. The proxies may have been banned because they were used to post spammy messages - but this is completely unrelated to whether they performed those message transactions using HTTP POST. Despite the name, HTTP GET can be used to upload data to a server; so if the server admin blocked something, it's because of bad behavior, not on account of the protocol in use. Nimur (talk) 07:44, 11 October 2010 (UTC)[reply]
My impression from their responses is that the OP (who asked the same question before Wikipedia:Reference desk/Archives/Computing/2010 September 1#Need Proxy), was aware it was poor behaviour that got people blocked, not the protocol used. Unfortunately they were under the mistaken impression disabling HTTP POST would be enough to stop this poor behaviour (spamming and other things) and therefore stop people getting banned. Nil Einne (talk) 19:37, 11 October 2010 (UTC)[reply]

Suffix code

[edit]

What is a suffix code? --84.61.131.141 (talk) 16:21, 10 October 2010 (UTC)[reply]

We need some more context - suffix codes are used for everything from internet domain names to Chevy engine specifications. Maybe you want the list of Internet top-level domains, which specifies suffixes like .com, .org, and .us? Nimur (talk) 16:50, 10 October 2010 (UTC)[reply]
Other possible interpretations: suffix tree, suffix array. Paul (Stansifer) 17:44, 10 October 2010 (UTC)[reply]
It could be the reversal of a prefix code. I'd never heard the term before, but here's a paper that does use it that way. -- BenRG (talk) 02:15, 11 October 2010 (UTC)[reply]

Is the Klingon alphabet an example of a suffix code? --84.61.131.141 (talk) 10:18, 11 October 2010 (UTC)[reply]

You need to give us a better idea of what you mean by "suffix code" before we can answer that question. The Klingon language certainly uses suffixes to encode grammatical information - see Klingon language#grammar - but it also uses prefixes too. Gandalf61 (talk) 10:41, 11 October 2010 (UTC)[reply]

A suffix code is a code which is a reversal of a prefix code. --84.61.131.141 (talk) 14:27, 11 October 2010 (UTC)[reply]

Then you seem to have answered your original question. Any alphabet is trivially both a suffix code and a prefix code - no item in the alphabet is a prefix or suffix of any other item because every item is, by definition, a single character. Gandalf61 (talk) 15:53, 11 October 2010 (UTC)[reply]
This is true for plqaD, but not for the Klingon Latin alphabet, which uses digraphs and even a trigraph. As far as I can see, the Klingon Latin alphabet is indeed a suffix code, though it is not a prefix code.—Emil J. 16:08, 11 October 2010 (UTC)[reply]

xulrunner

[edit]

How do you make mozilla xpi files work on xulrunner? 82.44.55.25 (talk) 19:33, 10 October 2010 (UTC)[reply]

You could check the ActiveState Komodo's source code, it handles .xpi. --Dereckson (talk) 21:04, 10 October 2010 (UTC)[reply]
I don't understand 82.44.55.25 (talk) 21:11, 10 October 2010 (UTC)[reply]

Superscalar CPU Pipelines

[edit]

Hi. I was reading about the IBM POWER6 CPU here. On page 6, it says that each core is "7-way superscalar." Do they mean that it can complete seven identical microinstructions per clock cycle or that its pipeline consists of seven microinstructions? Or possibly they mean that it can execute seven non-identical instructions per clock cycle? I'm also curious how long its pipeline is.

Also, I read that the Pentium processor can execute two identical microinstructions in one clock tick. Since then, every Intel processor can execute three: [1] -- right?--Best Dog Ever (talk) 20:58, 10 October 2010 (UTC)[reply]

See Superscalar. It does mean that the CPU can (in the best possible case) complete 7 different instructions per clock cycle. However, that requires that there is sufficient parallelism in the code that 7 instructions can be executed in parallel without dependencies, and it requires that the instruction mix exactly matches the availability of functional units. But yes, modern superpipelined and superscalar processors can have hundreds of instructions in flight at any one time. --Stephan Schulz (talk) 21:49, 10 October 2010 (UTC)[reply]
What "n-way superscalar" means that that the processor can issue up to n instructions in a cycle. If the processor breaks instructions into microinstructions, then it can issue up to n microinstructions in a cycle. Some definitions of superscalar differ: some say instructions are issued, some say they are executed — but they should be identical in function since issued instructions will be executed, and executing or executed instructions have been issued. The instructions issued do not have to be identical in type (integer, floating point), nor do they have to be the same operation (addition, subtraction). Most of the time they are a mix of instructions since in some cases it is not worth the expense of having a processor be able to issue multiple instructions of a certain type (I will not provide examples since this is dependent on the application of the processor). Regarding pipeline length, the length of the pipeline is independent of the width of issue. You also mentioned instruction completion. Since the pipelines themselves do not have to be identical in length, the instructions issued in a cycle do not have to finish at the same time. It is common to find the integer pipelines shorter than the floating point pipelines, and for some execution units such as division to be unpipelined. Rilak (talk) 01:48, 11 October 2010 (UTC)[reply]
ok. Thank you very much. Good info.--Best Dog Ever (talk) 02:04, 11 October 2010 (UTC)[reply]
If I'm remembering correctly, all post-Pentium, pre-Core-2 Intel x86 processors can decode up to three x86 instructions per clock cycle. This obviously limits you to executing three instructions per cycle in the long term, no matter how many execution units you have. Core 2 can decode four per cycle. NetBurst (Pentium 4) had a micro-op cache to avoid the decoding overhead, so it might have been able to exceed the limit in some circumstances, but Pentium M and Core went back to the traditional undecoded cache (probably because undecoded instructions are much smaller, so you can cache more of them). -- BenRG (talk) 02:44, 11 October 2010 (UTC)[reply]
I don't think that the P6 was a three-way superscalar processor. The P6 had two simple decoders and one complex decoder. The simple decoders generated one microinstruction every cycle and the complex decoder could generate up to four. The maximum number of microinstructions generated on a cycle is thus six, unless there was a restriction on the parallel operation of the decoders (I can't remember if there was one or not). Since the P6 is capable of out-of-order execution, the microinstructions were held in a 48-entry buffer. The issue logic determined which microinstructions could be issued, and from these, up to five were issued in a cycle. Therefore the P6 is a five-way superscalar processor, although I don't recall if it was referred to as such. Rilak (talk) 05:14, 11 October 2010 (UTC)[reply]
After I wrote that the P6 is a five-way superscalar processor, I thought to myself, "Isn't a bit odd that you can't remember the superscalar-ness of the P6?" So I searched Google Scholar and found no mention of the P6 being five-way. All results referred to it being three-way. But in a conference paper written by two Intel systems engineers ("High performance software on Intel Pentium Pro processors or Micro-Ops to TeraFLOPS"), I found this interesting snippet: "I think"The Pentium Pro processor is often referred to as 3-way superscalar because of its ability to decode, dispatch, and retire three instructions per a clock." Rilak (talk) 05:38, 11 October 2010 (UTC)[reply]

Hotmail

[edit]

What the hell is going on?! almost-instinct 21:51, 10 October 2010 (UTC)[reply]

Mine's fine. Random Googling produced a website called Downrightnow, which has a Hotmail page... Vimescarrot (talk) 22:27, 10 October 2010 (UTC)[reply]
It seems accounts have been losing access - sometimes for long periods - on a one-by-one basis. There is nothing about this on the Hotmail home page or on MSN, but on the Hotmail page on Facebook there are a couple of mumblings from MSN, something about accounts being hacked. Searching twitter for "Hotmail" + "down" / "not working" / "fucked" showed a definite but far from overwhelming pattern (the last of those search terms giving the most results) My recommendation, to avoid this happening to you, should anyone care, is to change your password. But that might be total nonsense. almost-instinct 08:47, 11 October 2010 (UTC)[reply]

Help: Skype changes my folder icon

[edit]

Since installing Skype on my Windows 7 x64 computer, the icon of the containing folder [like "Program Files," just under a different name] has been changed to a folder icon which contains the Skype logo(!). Well, I know the rumors that Skype isn't exactly shy messing with users' computers... but this is going a bit too far! So I changed the icon back to what it used to be (i.e. just a plain Windows folder icon) via Properties... just to find that Skype didn't work anymore. I tried back and forth a bit... nothing. So I de- and re-installed the program... and now not only Skype, but also the modified icon is back. I still don't want it!!! To my utter surprise though, I haven't found anything about this problem on the Kraken.

Any ideas what's going on... and how to make sure my icons remain Skype-free while allowing me to use Skype? Thanks, thanks, Thanks for answering (talk) 23:28, 10 October 2010 (UTC)[reply]