Wikipedia:Reference desk/Archives/Computing/2016 September 1

= September 1 =

Rule 110
I read on wikipedia that the rule 110 of elementary cellular automaton is Turing Complete, which I believe means that any calculation is possible within that language. Is my understanding of Turing Completeness correct? If it is, how would I preform basic arithmetic (For instance, 5 x 2 = 10) using rule 110?

Thanks for your help, and let me know if this isn't the right reference desk for my question. Margalob (talk) 02:18, 1 September 2016 (UTC)


 * Since the Turing completeness proof is constructive, you can follow the proof: first figure out how to do multiplication in a cyclic tag system, then encode that in a rule-110 initial state as described in the rule 110 article. It will be difficult (or at least tedious) to make it work. There's probably no easier way. -- BenRG (talk) 08:01, 2 September 2016 (UTC)
 * Yes, what this and many other Turing-complete systems really show is how little it can take for something to be Turing-complete. See also Turing tarpit, esoteric programming language, one instruction set computer. --47.138.165.200 (talk) 04:39, 4 September 2016 (UTC)

Matching whitespace in regex
While writing regexes to match a single whitespace, is it better practice to write "\s" or " " ? Since both are valid solutions, I'd expect both to occur equally frequently, but I see my programmer colleagues prefer "\s" all the time. Is there any particular reason for that? La  Al qu im  is ta  09:45, 1 September 2016 (UTC)


 * In some implementations "\s" will match some other characters also like tab. See here. manya (talk) 09:52, 1 September 2016 (UTC)
 * only has any special meaning in some regex flavors. There isn't one single thing called "regex"; there are multiple different regular expression languages. Read this. As noted above, in most implementations that support it  will match things other than the space character, e.g. tab. To find out what it matches, see the documentation for whatever it is you're using. So the real question here is, what do you want to match? If you only want to match a space, use a space. If you want to match more than that, use something else. --47.138.165.200 (talk) 23:56, 1 September 2016 (UTC)
 * Additional thought: it's very common in regex flavors that support it to use, which will match a run of any whitespace character (well, sometimes only horizontal whitespace, not vertical, but that's a whole other can of worms). If you have whitespace-separated values, this will match the separator, so you can split on this regex. For instance in Perl 5: my @array = split(/\s+/,'foo    bar baz'); will populate   with elements "foo", "bar", and "baz". --47.138.165.200 (talk) 16:29, 3 September 2016 (UTC)

Windows Multiple Folder Name System
I have a need for a product that I haven't seen for Windows. I use in in Linux and an office that exclusively uses Windows wants the same system. What I have is a network storage system. It has a hierarchical folder system. I store files based on funding source, contract ID, and assigned team. That is the default view. I can change the view to date. I get top-level folders for year. I select a year and I get months. I select a month and I get days. Then, I can open a day folder and see all files last modified on that day. Once I select a file by day, I can revert the view to normal folders and I will be in the team folder that contains the file. Basically, they want a Windows file share that lets them flip between the actual folder names and a hierarchy of files by last modified date. Anything like that available? 47.49.128.58 (talk) 14:25, 1 September 2016 (UTC)


 * What you're describing is essentially a Document management system. -- Finlay McWalter··–·Talk 15:35, 1 September 2016 (UTC)


 * One option might be to use a relational database system to store links to the files. You could then have "reports" that list those links organized in any way you'd like.  The db system would be more flexible, such as allowing you to just list files with a particular combo of funding source, assigned team, and date range, even if that need was not anticipated when the system was set up.  StuRat (talk) 16:09, 1 September 2016 (UTC)


 * I can't make out what the OP wants, but here's a tip. If you have multiple dated files with the same name (example, "Meeting"), name them with a leading or trailing YYYY-MM-DD date format. Example: 2015-12-22 Meeting, 2016-02-07 Meeting, 2016-03-12 Meeting, etc. Or: Meeting 2015-12-22, Meeting 2016-02-07, Meeting 2016-03-12. You'll find that the folder opens with the files in strict year, month, day order. Akld guy (talk) 21:59, 1 September 2016 (UTC)
 * If you have the date before the filename, they will open in date order whatever the rest of the file name, e.g. 2015-12-22 Meeting, 2016-02-07 Party, 2016-03-12 Meeting - of course, that means you can't sort by the rest of the filename as conveniently. Generally, sorting by "date created" will give a similar result (though it may not, for example if the files have been downloaded from another source) MChesterMC (talk) 09:25, 2 September 2016 (UTC)
 * (OP here - using public computer at the hospital) Sorthing by date (date created or using dates in the name) won't work because the files are scattered all over the drive. The files are primarily sorted by subject matter. Every day, a few people need to see what has been added or edited in the last 2 or 3 days. They want to view the files based on date, regardless of what subfolder they are in. In practice, they ask me to do it because I use Linux and it is trivial to change my view from a folder view to a date modified view. I'm trying to find something similar in Windows so I don't have to do it every day. 209.149.113.4 (talk) 12:15, 2 September 2016 (UTC)
 * Would something like OpenDocMan [ http://www.opendocman.com/features/ ] meet your needs? --Guy Macon (talk) 13:22, 2 September 2016 (UTC)