Jump to content

Wikipedia:Reference desk/Archives/Computing/2013 May 4

From Wikipedia, the free encyclopedia
Computing desk
< May 3 << Apr | May | Jun >> May 5 >
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.


May 4

[edit]

Signature pictures containing colored symmetric geometric shapes

[edit]

In many internet fora, instead of cartoon pictures or a photograph to accompany their username, many users upload images which contain only geometric shapes (several polygons). The images are square, symmetric about the origin (a 90 degrees rotation will yield the same image), and two-colored (the ones I've seen use one color against a white background). For an example, see the bottom of this page, where many of the users use such pictures. My question is simply, what are these called, and what information do they convey. We probably have an article, about this, but I didn't find it. My google-fu a bit weak today maybe, if someone could suggest a search based on the above that would lead straight to the article, that would be instructive too. Thanks, --NorwegianBlue talk 08:17, 4 May 2013 (UTC)[reply]

Identicon. -- Finlay McWalterTalk 10:09, 4 May 2013 (UTC)[reply]
In the one system I've seen them used, they're assigned by the site admins, not uploaded by the users. Rojomoke (talk) 10:50, 4 May 2013 (UTC)[reply]
Thanks both! It's quite possible that they're assigned by admins, the number of users with identicons in the user-feedback page of Qiqqa is conspicuously high, given that the majority of users would be academics in other fields than computer science. There are two discrepancies between the image that illustrates our article, and the ones in the page I linked to, as well as the ones shown here.
  • The image in the article shows mirror-symmetry about both diagonals, whereas the ones I've seen show a four-fold rotational symmetry as described above.
  • The image in our article has a lightness gradient in the geometric shapes, the ones I've seen have a single color against a white background.
Does the color in an identicon have a special significance, and is there a symmetry constraint? --NorwegianBlue talk 11:10, 4 May 2013 (UTC)[reply]
It's a "visual hash" - it takes some data which kinda-sorta-uniquely identifies the user (e.g the IP address) and builds a picture of that. If the particular hash used in this specific site follows Don Park's original code, it takes a 32 bit value (which is the size of an IPv4 address) and computes visual elements based on different bit fields from that 32 bit value - see the comment in Don's code here. I haven't followed through the entire package to see if that's all it does (if there isn't some pre-mangling phase first); if it's that simple, then you should see that similar IP addresses will resolve to very similar Identicons: so if a user moved from 65.32.19.20 to 65.32.19.21, their Identicons should be pretty similar. But other schemes use some confusion and diffusion process (like MD5) to mess the data up before it gets passed to the identicon renderer - that way even a small change in the input data will yield a massive change in the identicon. How a site builds that data will vary; Stack Overflow's scheme (which uses md5, feeding data into the Gravatar identicon engine) is described in this posting. -- Finlay McWalterTalk 17:26, 4 May 2013 (UTC)[reply]
Thanks a lot! --NorwegianBlue talk 05:46, 5 May 2013 (UTC)[reply]
Resolved

Partioning

[edit]

What is the object of partitioning the hard drive on my MacBook Pro and how would I do it please?85.211.128.100 (talk) 12:07, 4 May 2013 (UTC)[reply]

Other than just general specialization for various reasons, most likely as part of the installation of an OS. How you’d do it would probably best depend on why it is you want to do it. ¦ Reisio (talk) 12:21, 4 May 2013 (UTC)[reply]
The primary reason for having separate partitions (and thus file-systems) is that is easier to reinstall MacOS onto the main partition, should you need to. The installer can recreate the MacOS partition from scratch, and your data is safe on the second partition. It can also make recovery from incorrect shutdowns easier. However, the main disadvantage is that you have to decide in advance how much disk space you want to reserve for applications themselves, and how much for your data from those applications. CS Miller (talk) 14:25, 4 May 2013 (UTC)[reply]

Thanks for your thoughts 85.211.128.100 (talk) 05:47, 5 May 2013 (UTC)[reply]

Switching users on Twitter

[edit]

I use several Twitter accounts - one personal, one for work, one for a client. When using it through my browser on my PC it seems I have to log off one account and log on to another in order to tweet or browse from the different accounts. On my iPhone through the Twitter app I can log on as multiple users at once and simply switch from one to the other with two taps to tweet or browse as the different users, without logging off and on. Am I missing something and there's some way to do this on the PC? If not, does anyone know why Twitter build this functionality into their app but not the browser version? (BTW I'm not particularly interested in hearing about third party sites that can do this - I know they can - just wondering about Twitter itself.) --60.230.34.7 (talk) 15:02, 4 May 2013 (UTC)[reply]

This functionality is built in to Twitter's own client, TweetDeck (which can be a local client or a single-sign-on web client). Where the browser is the client (without TweetDeck-web), it's the browser that's responsible for managing user identities, and so most of the work is done by the browser's password manager. But you're right, that leaves you with the bother of having to log out of one account and then log into another. That's necessary (usually) because of the way the web works - a web app like Twitter's identifies who is currently logged in (on a given browser) using HTTP cookies. Browsers share the same cookie jar between all their tabs - so if you're logged in as Kevin in one Firefox tab, you're Kevin in all the others too - and logging out in one invalidates the cookie, effectively logging you out on all the other tabs too. That's not Twitter's fault, and there's not much they can do about that; I imagine they'd say "simultaneously managing multiple Twitter accounts is a more advanced activity, and more advanced users should be using TweetDeck rather than the simple webapp". To have multiple concurrent Twitter sessions open in the same browser (or to quickly switch between them, without logging out and in) it's necessary to change the way the browser works - to support that partitioning that, as I said above, it doesn't normally do. Firefox users can do this with the MultiFox extension. -- Finlay McWalterTalk 16:48, 4 May 2013 (UTC)[reply]
Thanks very much Finlay. That's a very informative response. One workaround I had used a few times was opening multiple browsers, say Firefox and Chrome, and logging in as a different user in each. This explains why that would work if it's basically a matter of cookies associated with the browser. FWIW I've now set myself up on TweetDeck (I had heard of it, but didn't realise that it was actually run by Twitter, or that simultaneously operating as multiple users was one of its features). Looks good. Think I might also take a look at MultiFox. Thanks again. --121.221.235.242 (talk) The user formerly known as 60.230.34.7 02:41, 5 May 2013 (UTC).[reply]
Oh, one other question that comes to mind, if anyone knows. Twitter is obviously happy for users to run multiple accounts, however when you go to create a new account it requires you to use a unique email address, i.e., you cannot create an account using an address you've got attached to an existing account. Now if it used the email address as your login name (as many sites do these days) this may make sense, as two users couldn't use the same login-name, but since you log in using your unique username not your email it seems immaterial that the same email address may be attached to more than one account. If Twitter theoretically prohibited multiple accounts it may also make sense, but clearly it doesn't prohibit this. So does anyone know what's up with that? I guess another way of looking at this would be to say why doesn't Twitter allow you to create multiple 'users' under one account, rather like how you can create Pages on Facebook for your organisation, and then post as either yourself or your organisation. ----121.221.235.242 (talk) The user formerly known as 60.230.34.7 06:06, 5 May 2013 (UTC)[reply]
I am not experienced with Twitter, but I'd imagine having to make a separate email account for each new Twitter one is a good deterrent for people who would make tons of spam/random pointless accounts. --Yellow1996 (talk) 23:53, 6 May 2013 (UTC)[reply]

Like button on banknote

[edit]

Are there banknotes on which an URL to the website of the issuing bank or any other reference to an internet resource is displayed? If so, what banknotes?

I'm interested only if the reference is put right on the banknote when it's manufactured, such as printed on it together with other labels and graphics, not for cases when someone stamps an advertisment on banknotes later. Whether the note is currently in circulation doesn't matter.

b_jonas 17:13, 4 May 2013 (UTC)[reply]

The Royal Dutch Mint produced a limited edition 5€ collectible code with a URL to its website encoded on it with a QR code 2d-code.co.uk/qr-code-coin. The Swedish Mint commissioned a new note, the designer of which took it upon himself to put a QR code on it- but the mint didn't like the idea and says that the final notes won't have the code - 2d-code.co.uk/qr-code-banknotes. (urls mangled as the spam filter has an entry for that site)-- Finlay McWalterTalk 17:34, 4 May 2013 (UTC)[reply]
Thank you for the quick reply. – b_jonas 20:22, 4 May 2013 (UTC)[reply]

Turning client-server model into processes sharing memory boosts performance?

[edit]

There are paragraphs in the book "C++ - Pthread Primer - Multithread Programming":

And as we know, many applications follow the client-server model, such as XWindow, D-Bus, Metacity window manager, Wayland's compositor, ... etc. I suppose client-server model literally results in slow responses of the applications. As this article mentions XWindow:

If the applications following client-server model can be rewritten or refactored such that they become processes sharing memory when executing, does it improve responses? (After the rewriting/refactoring, the relationship between the client and the server is more like a "procedure call" rather than an inter-process "communication". So everything fulfills immediately just like calling a procedure, to which I suppose there is no context switch at all and the response should be swift. No?) --- Justin545 (talk) 19:16, 4 May 2013 (UTC)[reply]

Don't mistake shared memory, a means of inter-process communication, for what MicroXwin does; the latter is essentially moving the X server into the kernel. "Client server" describes the relationship between two components, not the means of those components communication - a client process and server process can communicate by unix-domain sockets, TCP/IP (network) sockets, shared memory, or other IPC mechanisms like doors. Shared memory IPC is not very much like a procedure call - there are still two processes with two separate instruction pointers and calls stacks, which have nothing to do with shared memory. Because the two processes are asynchronous, there must be a synchronisation mechanism to coordinate use of the shared memory. On unix(alike) systems this is often done with a pthreads semaphore in the shared space. The major advantage of shared memory is not timing, it's that it reduces the amount of copying needed to move data across (other low- or no-copy means of IPC are available). But you still have two processes, there's still latency between the two, and a context switch is still required. -- Finlay McWalterTalk 19:33, 4 May 2013 (UTC)[reply]
Ok, shm is kind of IPC by definition.
I think context switch is needed only when two or more clients are contending for a shared resource supplied by the server. The later client has to wait until the resource is released by the client that has acquired the resource. So a context switch is needed (it's my mistake). And I think MicroXwin can't get out of this situation even if moving the X server into the kernel. Context switch is still needed or resource can't be released. Except for contended case, I can't figure out any context switch is needed for non-contended case so far. The solution of processes sharing memory and the MicroXwin kernel solution both need to context switch.
And the sentence should be corrected "So everything fulfills immediately just like calling a procedure, to which I suppose there is no context switch at all for non-contended case and the response should be swift in such case.". Still wrong? -- Justin545 (talk) 20:37, 4 May 2013 (UTC)[reply]
Incidentally, I see you wrote the MicroXwin article. When is the article going to get independent, reliable sources? It's been tagged as lacking those for four years, and without them it's just an unsourced advert, which I am inclined to nominate for deletion. -- Finlay McWalterTalk 19:43, 4 May 2013 (UTC)[reply]
Although advertising was not my intention, non-primary sources for it are hard to find. So it's your right to nominate for deletion. -- Justin545 (talk) 20:53, 4 May 2013 (UTC)[reply]
In any event, it's worth questioning whether IPC latency is a problem worth bothering about, when considering ordinary user-interfaces of the kind one codes in the X Window System. It's a central matter for games, but games use OpenGL or Direct3D which are architected quite differently. Cambridge University's Computing Laboratory has a nice IPC benchmark suite for Linux, which gives us some comparisons of the raw performance of various IPC mechanisms on various processors. Consider the results for the decade old Opteron 248; even its slowest performer (a local TCP socket, which has to traverse at least part of the TCP stack, two copies, and two task switches) shows latency of 35 µs - that's about 30,000 calls per second. For mempipe_lat (which, if my cursory read of the code is correct, is a test of raw shared memory performance without synchronisation) they get about 1 µs latency - so 100,000 calls per second. Those are orders of magnitude more than a reasonable X gui application needs - and that's on an ancient processor. -- Finlay McWalterTalk 20:31, 4 May 2013 (UTC)[reply]
Yep, the IPCs may not be the bottleneck as the benchmark demonstrates. But I think context switch and the scheduling algorithm is the real deal in responsible for slow application response, not the IPCs. Because there could be hundreds of processes in the system need to be run in turn by the scheduler, unless there is a mechanism like direct process switch (where during an IPC execution an (incomplete) context switch is performed from the sender directly to the receiver) we are not often able to tell there'll be no other processes take precedence to run between the sender process and the receiver process, which adds extra latency. And synchronized request makes it worse since a round trip is needed to pass the data. That's why I think the client-server design could be improved by the idea of processes sharing memory. -- Justin545 (talk) 22:55, 4 May 2013 (UTC)[reply]