Wikipedia:Reference desk/Archives/Computing/2017 January 28

From Wikipedia, the free encyclopedia
Computing desk
< January 27 << Dec | January | Feb >> Current desk >
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.


January 28[edit]

PCBSD wired dhcp not working. What can be the problem?[edit]

I have an pc that has the windows os and pcbsd installed at it.
The modem i use is Technicolor TD5130V2, the pc is connedted to it by wire that is then to the internet.
I can use the internet as usual when working with windows, but when I try to use pcbsd, the dhcp doesnt work and it gets no ip, if I try to put fixed ip, it also doenst work, it doenst save the values. I have some usb wireless network adapter, and I tried and it works with pcbsd and its the only way right now I am able to use network/internet with pcbsd.
What can be the problem?201.79.78.226 (talk) 01:10, 28 January 2017 (UTC)[reply]

It may be that the onboard ethernet network adaptor of your system is not supported by the kernel you are using. The dmesg and ifconfig -a shell commands may be useful to gather more information. If you are having difficulty finding proper user discussion resources and help for PCBSD, remember that it is based on FreeBSD, so its resources (i.e. documentation, user mailing lists, IRC channels) may be helpful as well. 76.10.128.192 (talk) 00:04, 29 January 2017 (UTC)[reply]

Home Network vs. Internet[edit]

I've been playing around with a small home web server that I access through my router: the IP address is in the 192.168.1 range that is reserved for personal networks. I know that if I go to my parent's house and type in the address, it won't connect, but how far does my home network extend? Would someone have to connect to my router in order to access my server? And if I purchased a domain name, does the IP address come with it? That is, if I bought a domain name, can I point it to my server and access it from across town (not that I'd do this--it's probably a bad idea--but I'm trying to better understand the difference between a local server, and a server that is a part of the Internet). OldTimeNESter (talk) 01:16, 28 January 2017 (UTC)[reply]

Hi User:OldTimeNESter! 10.0.0.0 - 10.255.255.255 and 192.168.0.0 - 192.168.255.255 are so-called private address ranges, they can only be used inside your Local Area Network (e.g. 192.168.1.2 can communicate with 192.168.1.3 over the LAN). So currently the only devices who can connect to your web server are those connected to your local area network, which probably consists of a router and a handful of devices inside your home.
You also have a public IP address which may be used for communication between devices on the internet (outside of your LAN), for example 172.217.17.142. If you want to access your server from somewhere else (outside of your LAN) then you won't need a domain name but you'll need to tell the router that all connections to your public IP address 172.217.17.142 on the port 80 (which is commonly used for web servers) should end up at 192.168.1.2 (or whatever the local IP address of your web server is).
When you've done that then you can access your web server from almost anywhere by typing in the IP address. But humans are kinda bad at remembering IP addresses. That is why we invented domain names. There are computers, we call them DNS servers, who know which domain name(s) belongs to which external IP address. For a small fee you can register something like www.oldtimenester.com. If someone tries to access that website (and everything is configured correctly) then a DNS server will say "if you want to reach www.oldtimenester.com then you will need to go to 172.217.17.142". The router is responsible for the next step, it knows that connections to 172.217.17.142 on port 80 should go to a device on your local network, in this example 192.168.1.2. (((The Quixotic Potato))) (talk) 06:08, 28 January 2017 (UTC)[reply]
I'd note you can't be certain this will work no matter what you do. While CGNAT is relatively uncommon in the developed world for home user connections, it does exist. Similarly some ISPs may block port 80 or do other weird things which prevent it. IPv6 may help but even if it's supported which remains a big if, there's still a chance your ISP will have done something which prevents it.
Assuming the IP isn't directly allocated do your computer, you'd also actually need to be able to enable portforwarding on the router, or replace the router, but these two aren't always possible. (Port forwarding was mentioned above, but not that it may be simply not possible.) Also if your IP isn't static, particularly if it changes frequently, you'd want to set up some sort of automated dynamic DNS for your domain name.
Considering a webserver is probably a bigger and more vunerable target, a better solution may be to use some sort of good VPN solution or maybe SSH, so the parents home computer can be on your local network. (Not that this will completely eliminate the above problems.)
Nil Einne (talk) 16:26, 28 January 2017 (UTC)[reply]
Thanks to both of you for your help. I knew that my ISP assigned my router an Internet address, but I never thought that it could be used to access my local network from outside of it (subject to the caveats listed above). I know they don't assign me a static IP, but I typically get the same one every time I connect; I don't know whether they block port 80, or do anything else to stop this sort of thing, but since I have a standard subscription (i.e. I really shouldn't be running a web server over it), it wouldn't surprise me. Like I said, though, this is just a thought experiment to help me better understand how my LAN relates to the Internet at large. OldTimeNESter (talk) 16:50, 28 January 2017 (UTC)[reply]
Actually hosting public websites from a "consumer" internet connection is almost universally against any ISPs terms of service, however there ARE many services for which you should be able to "legitimately" access your home network from the internet, such as home surveillance (using IP cameras for home security), or home automation. Those also require you to be able to access your home network from the internet and would require similar "configurations" to be made. Vespine (talk) 00:37, 30 January 2017 (UTC)[reply]
@Vespine: Do you have evidence for the claim that "Actually hosting public websites from a "consumer" internet connection is almost universally against any ISPs terms of service"? Where I live we have a net neutrality law (see Net neutrality in the Netherlands), and I have never heard of an ISP in my country that does not allow people to host websites on their consumer internet connection. I have been hosting a website and some other services on a consumer internet connection for over a decade (way before that law was enacted). (((The Quixotic Potato))) (talk) 03:30, 30 January 2017 (UTC)[reply]
My info might be severely out of date :) It used to be the case, and I think it "might" still be the case (but I'm struggling to find the current ToS for my provider) that hosting web servers on "domestic" internet connections was against the terms of service of the major ISP providers in Australia. However for most practical purposes this policy was never actively enforced, and was most likely only there so that they would have recourse to disconnect you if all of a sudden millions of people hit your site, or something like that. Vespine (talk) 03:50, 30 January 2017 (UTC)[reply]
I looked up the ToS of three major French providers (Orange SA, SFR and Bouygues Telecom) and there is no such policy. You pledge to respect the law (...sounds stupid, but I guess the reason is they can cut you off the network without a court order if they see you seeding torrents on Thepiratebay) and to have a "private and personal use" (i.e. don't share your wifi with everyone in the building, and don't use it for professional purposes).
I would venture the real limitation is that the upload speed of a personal internet connection will usually be fairly lower than the download speed. If you just want to make a blog about your trip around the world for friends and colleagues to read, it will be enough, but if you expect reasonably large traffic, 503's will happen. Of course, if the Wikimedia Foundation suddenly transfers the Wikipedia servers to a personal connection in the Lofoten islands, the local network will instantly collapse and the ISP will cut the domain/IP off the grid as soon as possible (possibly even without a human being involved, in such an extreme case). But if the website traffic grows gradually, the first throttle point will be the connection upload speed, rather than the ISP's capabilities. TigraanClick here to contact me 12:42, 30 January 2017 (UTC)[reply]
I bet that Internet of Things crap doesn't count on having a fixed IP address... bet it checks in at company headquarters just so that, you know, you can find it. And get backups of those old photos from inside your house, in case you should lose them. Or what if there's a terrorist in your bathtub? Anyway, I don't think you can generalize from that to a home based server. For example, a home based server could (no please don't do this!) automatically edit your Wikipedia talk page to let you know where it is every time it starts up. (Really though, you could use justpaste.it for a similar purpose, making sure to retain the edit link) Wnt (talk) 15:50, 1 February 2017 (UTC)[reply]

Accessing internet via wifi[edit]

My mom has an old PC (Windows 2000, I think) with no current internet access. Her community does have free wifi, though. So, what would I need to get her to access the internet ? StuRat (talk) 17:14, 28 January 2017 (UTC)[reply]

You can probably get a PC for free that is better than the one she currently has. If the computer has USB ports then I would recommend typing "USB WIFI" in your favorite search engine (if it does not then it is probably so old that it is probably unusable, realistically speaking). The devices are commonly called "USB wifi adapter" or "USB wifi dongle" and cost less than 10 dollar. A computer that old probably won't be able to run modern antivirus though! (((The Quixotic Potato))) (talk) 17:26, 28 January 2017 (UTC)[reply]
@StuRat: I wouldn't be surprised if you can get an old phone for free that is better than the PC she currently has! If you are willing to invest some time and/or the amount of money that it costs to get a six-pack of beer then I would recommend trying to get a PC or phone that is more up-to-date. (((The Quixotic Potato))) (talk) 17:29, 28 January 2017 (UTC)[reply]
Honestly, the cheapest and simplest option would probably be a new laptop or a wifi-enabled tablet computer. Amazon lists Chromebooks and other cheap laptops for under US$200 right now. I don't think it's economically feasible to harden an ancient PC to be safe to use on the current internet, even if you manage to find a wifi card and drivers. Unless you want your mom to handle OpenBSD, of course ;-). --Stephan Schulz (talk) 17:33, 28 January 2017 (UTC)[reply]
If you want to spend less then I recommend offering a six-pack (or even a case) of beer for some second hand hardware; that is what I do if I cannot find the thing I want for free. Making an ancient PC usable is do-able, but it takes time, and it is probably quicker and easier to get newer hardware. (((The Quixotic Potato))) (talk) 17:45, 28 January 2017 (UTC)[reply]

You have to understand that she is 82 and unable to adapt to change. I had to replace her monitor and she still complains that it's just not the same, although I can't see any difference. The extent of her internet access would likely be to access the daily weather on a favorite/bookmark I would set up for her. I'd also like to have internet access there, say to look up an address for her, when I visit. StuRat (talk) 18:35, 28 January 2017 (UTC)[reply]

Well, it is very likely that the computer has a USB port if it is running Windows 2000 so in that case I would recommend buying an old "USB wifi adapter" or "USB wifi dongle" for less than 10 dollars (make sure it supports your Windows version, many of them support XP and up). Ideally it would have the drivers required on a CD. I don't know where you live, otherwise I would post a link. (((The Quixotic Potato))) (talk) 18:50, 28 January 2017 (UTC)[reply]
You should post the actual specification of the computer if you want better answers. I also think it is a bit strange that Win2k is used on a home PC – win2k lacked a home version and was mostly used in the professional environment. Ruslik_Zero 18:58, 28 January 2017 (UTC)[reply]
Maybe it's 98, then. I'll post specs next time I get over there. All she does is play solitaire on it now. StuRat (talk) 19:49, 28 January 2017 (UTC)[reply]
Think it might be better to view your mother as someone that finds it frustrating that takes her 'longer now' to adapt and would rather things no longer changed. However, over her lifetime she would have seen and lived through many changes. Put it to her, that just as women no longer wear uncomfortable restrictive wale-bone corsets, no women to day needs restrictive, uncomfortable Windows 2000. Then put in some quality-time to hold her hand until she becomes familiar with (say) a Chrome-book. Hands on experience with someone there (you) to avoid the frustration that comes about from the unfamiliar will dissolve the unable to adapt bit. Remember too, when you show her anything, perform your key-stokes very, very slowly. So that she has time to understand what you are showing her. Also, pause a lot, to give her time to ask questions. This is because as one grows older one's BS detector no longer automatically accepts what is said unless the explanation makes sense to what has been said before. The financial aspect of a new computer is a pittance really when one comes to think about it. What you receive back from the interaction though, could be beyond price. If she only uses it for solitaire, introduce her to Google. She must have some interests that google will reopen.--Aspro (talk) 20:20, 28 January 2017 (UTC)[reply]


There are still PCI (not PCI-Express) WiFi cards available. I think PCI was around at the time the PC in question was made. LongHairedFop (talk) 22:10, 29 January 2017 (UTC)[reply]
On the other hand, if all your mother does on the PC is playing Solitaire, why not giving her a separate device just for internet access? We have made members the previous generation happy in one case with an iPad (in addition to the PC used for writing) and in another case with a cheap Linux laptop with a nicely configured background image and FIrefox. --Stephan Schulz (talk) 22:21, 29 January 2017 (UTC)[reply]
Chromebooks are sometimes available for under $100, and they are basically just web-browsers. Perfectly acceptable for looking at emails from the grandchildren, or whatever, and difficult to screw up.
However, Before you do any of this, I'd verify that there's really is a good wifi signal where she lives. ApLundell (talk) 15:48, 31 January 2017 (UTC)[reply]
Do not deal with or use obsolete and unmaintained software. Going online with it risks to spread malware around. If you do not consider to open the wallet, backup all data like you would change to another computer. Get the iso file of 32 bits Linux Mint version 18.1 „Serena“ with Mate desktop environment edition, which is easy to install, supports WIFI, comes with many drivers, is quick like W2K and for users most similar to use compared to the Windows desktop. The DVD image in ISO file format is a live CD. The live session shows the minimum hardware to be supported. But the live session is slowed down by the accesstime of the opitcal drive and no pagefile or similar swap partition. You only should keep an old operating system when not ging online, have not direct internet connection and use software which only requires to use this environment like automation. --Hans Haase (有问题吗) 12:52, 1 February 2017 (UTC)[reply]

Thanks for the answers, all. StuRat (talk) 22:24, 1 February 2017 (UTC)[reply]

Against what background you calculate the entropy of a word?[edit]

Against what set do we calculate the entropy (as Entropy (information theory)) of the words in a real text?

If it begins with "The", for example, would you consider it's one among thousand of words?

If a reader knows that many texts begin with "the" would that mean that for him (but not for others), this word has a lower entropy?

If a reader has a really limited vocabulary (1,000-2,000 words), would that means that the word has a lower entropy too? It would be just one among 1,000-2,000.--Llaanngg (talk) 19:52, 28 January 2017 (UTC)[reply]

The true foreknowledge of the receiver limits the numerical entropy (Shannon entropy) given by the formula where pi is the probability of character number i showing up in a stream of characters of the given "script". To a receiver that doesn't know a file is a text file, H = 8 x (number of characters) if it uses one-byte character coding such as extended ASCII. Knowledge that there are either 36 (A-Z+0-9, case insensitive) or 62 (A-Z+a-z+0-9, case-sensitive) alphanumeric characters gives lower H = 5.17 x (number of characters) or H = 5.95 x (number of characters) respectively. Knowledge that the language is English greatly reduces the entropy of a complete phrase or sentence, but it is hard to calculate such a short extract as "The". As an estimate, this source delivers 2000 English language matches to the pattern "the " and appears to stop searching after "the a" so we might expect about 52,000 if it went on to "the z", bringing H to 15.7. Lack of foreknowledge in the receiver, equivalent to untrue foreknowledge, does not affect the message entropy unless it has been simplified to be read only by that particular receiver. Blooteuth (talk) 00:33, 29 January 2017 (UTC)[reply]
A bit of vocabulary: let us say that we want to compress a word made made of characters. Note that a "word" could be a sentence and a "character" a word. We will use a dictionary to encode each token as a binary chain of 0s and 1s. The question is how to pick the dictionary that minimizes the size of the binary chain.
Shannon entropy is a source-based definition: if you assume that the source will spit out a very large number of words, each of those independent of the other, and you know the rules of generation, you can arrange for the encoding to use less bits on the most common characters, even if it costs more of the rarest ones; take advantage of the correlation of successive characters, etc. Data suggests that for English text, compressing by character, that entropy is about one bit per character.
Kolmogorov complexity is a receiver-based definition. You start with a programming language, chosen before you know anything about the source, and then receive one word; you must then make as small as possible a program that generates that word. Because (at least part of) the dictionary is chosen in advance, that entropy is higher. It seems that calculating (bounds of) the Kolmogorov complexity of English text is hard; I guess this paper is somewhat legible, and gives a starting point for a bibliography hunt. TigraanClick here to contact me 12:09, 30 January 2017 (UTC)[reply]
If you want good papers on Shannon entropy vs. Kolmogorov complexity, I suggest searching for Peter Grunwald. His papers show up in citations of many PhD candidate survey papers. If he wasn't so young, I'd probably have cited him myself. 209.149.113.5 (talk) 14:21, 30 January 2017 (UTC)[reply]
Interesting question, one has to choose background material that suits the different situation. IF doing Scottish texts then a corpus of works from Scotland is what is needed, if chemical texts then works on chemistry. The constraints one places on the text can also be placed or the works used to produce the statistics. Dmcq (talk) 11:03, 1 February 2017 (UTC)[reply]