Wikipedia:Reference desk/Archives/Computing/2009 August 9

= August 9 =

Programming Languages as Intellectual Property
Are programming languages patented or copyrighted? --Melab±1 &#9742; 01:18, 9 August 2009 (UTC)
 * It's possible to patent a programming language, copyright the documentation, and trademark the name.
 * See software patent for all the problems involved.
 * For example r++ has patents applying to it. In general whole programming languages are not patented since it's difficult to invent one that doesn't involve a lot of prior art.
 * You asked a similar question before
 * There's nothing to prevent an individual or organisation attempting to protect its intellectual property rights on new inventions. That's one of the reasons why license agreements exist.83.100.250.79 (talk) 02:09, 9 August 2009 (UTC)


 * I actually don't think the above is correct. I did not think languages themselves were patentable or copyrightable.  Certainly you could patent the compiler if the compiler has some novel features that are patentable.  Could someone provide actual citations for these claims?  (The software patent article is silent on languages.)   Tempshill (talk) 03:02, 9 August 2009 (UTC)
 * Obviously in practice it's totally impossible to invent an entirely new programming language that doesn't use stuff that's already been invented.83.100.250.79 (talk) 12:37, 9 August 2009 (UTC)

This isn't legal advice, just the understanding of a coder and open-source advocate:

Copyright applies to expressions, not ideas: the source code of your compiler, or the manual that describes the language, can be copyrighted -- not the syntax or the concepts behind it. So copyright cannot prevent someone else from independently implementing it. Patent law requires an original inventive step that goes beyond the prior art -- of which there is really quite a lot in the thousands of languages that have been devised in the past fifty or so years.

The name of a programming language can be trademarked, which can restrict competitors from branding their implementation under the same name. (See Visual J++ for one example: the trademark license for "Java" allows others besides Sun to use it only if their implementations are fully compatible. Microsoft's isn't, so they couldn't call it Java.)  However, trademarks don't prevent someone from advertising their system as compatible with yours (think "100% IBM-compatible" from the early days of PC clones: "IBM" is a trademark, but Compaq can still call their product "IBM-compatible", if it is).

One question is whether it would ever be useful to try to restrict others from implementing a language you've devised. The biggest barrier to the adoption of new languages is the network effect: few programmers want to learn a language that is not already popular, since there are not many projects (or jobs!) that use it. Trying to block rival implementations is unfriendly to the user community and suggests vendor lock-in. This sounds like a recipe to ensure that the new language does not become popular. --FOo (talk) 07:46, 9 August 2009 (UTC)
 * Yes that seems 100% correct
 * However there is one good reason to have some form of illectual property control over a language - which is to ensure that other implementations stick to a standard eg see Microsoft_Java_Virtual_Machine (many companies do not restrict the use of or charge for the use of their inventions). 83.100.250.79 (talk) 12:59, 9 August 2009 (UTC)


 * I think you've just illustrated why the expression "intellectual property" is intellectually bankrupt: when you say it, people have no idea what you mean -- since copyrights, patents, trademarks, trade-secrets, and other so-called "intellectual property" are all very, very different. --FOo (talk) 05:57, 10 August 2009 (UTC)
 * Eh! Apart from everyone who read the question ? ,and a phrase such as 'intellectual property' can't be intellectually bankrupt (except in the obvious sense that it has no intelligence) only a person or group of people..83.100.250.79 (talk) 09:19, 10 August 2009 (UTC)

Windows Live Mail
I have just been assigned a new e-mail address that will be used by my college, Lees-McRae College. It is a @email.lmc.edu account, but I believe it is somehow run through hotmail or windows live. But when I try to register it on Windows Live Mail on my laptop, I can't figure out what to put for the servers. Help? —Preceding unsigned comment added by Hubydane (talk • contribs) 03:39, 9 August 2009 (UTC)


 * Yeah, it's "Live@edu" which is run through Windows Live (which runs Hotmail now). Here's the POP server settings:
 * Incoming Mail Server server name: pop3.live.com protocol: POP3, using SSL port: 995
 * Outgoing Mail Server server name: smtp.live.com protocol: SMTP, using SSL port: 25 username: enter your full email address
 * Found here, under "end user features". Hope that helps. Indeterminate (talk) 04:22, 9 August 2009 (UTC)


 * Thanks! —Preceding unsigned comment added by Hubydane (talk • contribs) 13:20, 9 August 2009 (UTC)


 * Anyone wouldn't happen to know about a @ymail account? I know it's through Yahoo! but I can't get in configured right... —Preceding unsigned comment added by Hubydane (talk • contribs) 13:26, 9 August 2009 (UTC)
 * It uses POP3, but yahoo only supports that for paid subscriptions, apparently you can bypass this using the YPOPs! free program. If you have a paid subsription try the yahoo mail site, select help and follow the links.83.100.250.79 (talk) 13:46, 9 August 2009 (UTC)


 * Okay, so I used the server settings for the @email.lmc.edu and I received emails just fine, but when I try to send I get a message saying that the server was not able to connect and send or something like that. Came across like the outgoing server was wrong. Any help? —Preceding unsigned comment added by Hubydane (talk • contribs) 14:04, 10 August 2009 (UTC)

Targus AMW26US mouse
I have a Targus AMW26US mouse and after pushing one of the buttons on the USB wireless connector yesterday, a red light on the mouse began to blink. It has been blinking ever since. What is wrong with the mouse? As I no longer have the manual and the website has no download available, what can I do to stop the blinking red light? --Blue387 (talk) 07:07, 9 August 2009 (UTC)


 * I have a similar mouse, albeit Logitech rather than Targus. I believe this is the wireless device trying to negotiate a connection to the mouse. Try unplugging the USB dongle, powering off the mouse, plugging the dongle in, and then powering it back on. --FOo (talk) 07:48, 9 August 2009 (UTC)


 * It's almost certainly the 'bind' button that binds the wireless dongle to the mouse - what is supposed to happen is that the button is pressed on the dongle and at the same time you press a button on the mouse. Look on the bottom of your mouse for a tiny button.83.100.250.79 (talk) 12:21, 9 August 2009 (UTC)


 * I have pushed the button underneath the mouse and unplugged the dongle and the red light is not going away. The light goes away if the mouse is not moving but blinks every time I move the mouse. I have decided to contact the manufacturer tomorrow. --Blue387 (talk) 19:53, 9 August 2009 (UTC)
 * You're supposed to plug in the dongle, and push the button on the mouse and the dongle!
 * This way the mouse and dongle can 'mate' since both are in a special mode at the same time, and can get identification information from each other (important if you work in an office with lots of mice and dongles)
 * Also a red light on the mouse may mean flat battery>83.100.250.79 (talk) 21:41, 9 August 2009 (UTC)
 * I have switched the batteries for fresh ones and the red light is gone. I was promised that this would not need batteries for six months! --Blue387 (talk) 00:36, 12 August 2009 (UTC)

USB stick between Mac and PC
I've got both a Mac and a PC and I usually copy stuff between them using a USB stick no problem, although I think it depends on what stick you use, I've had some trouble with certain sticks. Anyway, I recently had to copy quite a large file (7gig) and so I bought a new stick (16gig). Both Mac and PC seemed to recognise it (empty). When I tried to put the 7gig file on it, the Mac came up with an error because the file was too big. So I had a look on some forums and found a solution. I essentially reformated the stick in the Disk Utilities function of the Mac, (I selected the 'Mac OS Extended(Journaled)' option), it then allowed me to copy the file onto the stick. So far so good. But now I've formatted the stick for my Mac, my PC won't read it. Does anyone know how I can format the stick so that both PC and Mac recognise it and I can put a 7gig file on it?Popcorn II (talk) 08:32, 9 August 2009 (UTC)
 * I assume the initial problem you are referring to is the 4 GB file limit on fat 32 file systems. You are correct that to copy a 7 gigabyte file you need to use a different filesystem. If you look at the article comparison of file systems your options are either to use NTFS by installing the NTFS--3G driver for your Mac, or to use HFS and install one of the third-party Windows applications that provide Windows support for this filesystem. In that article the table on operating system support provides some useful links for such applications. Rjwilmsi  08:42, 9 August 2009 (UTC)


 * If you don't want to install system software on either system, and you have a degree of intestinal fortitude, then the following will work. The following is written for Linux->Windows (because I don't have a Mac), but the only change should be changing the disk device name (I think Mac disks are called /dev/disk0, /dev/disk1, but maybe some kindly Mac person can confirm this).
 * insert the USB disk into the unix machine, and unmount it (we're going to be trashing its contents entirely)
 * assuming the usb disk is /dev/sdg and we want to store a local folder called copyme do the following tar c copyme | dd of=/dev/sdg Note: make very sure you know which disk you're outputting to - get this wrong and you'll wipe our your system disk and trash your system (hence the instinal fortitude)
 * note down how many blocks dd reported writing - in my example that's 80, for you it'll be a lot more
 * install dd on Windows (I used the chrysocome.net one)
 * move the usb disk from the mac to the window machine
 * check to see which disk device the usb disk is, using dd --list - in my case it's \\?\Device\Harddisk2\Partition0 which is Windows' obscurantist way of daying "disk2's raw surface"
 * on windows do dd count=80 if=\\?\Device\Harddisk2\Partition0 of=foo.tar where that 80 is the number of blocks the dd reported above, and the <tt>if=</tt> parameter is the windows name of the usb disk device.
 * that creates a windows file called <tt>foo.tar</tt> which archivers like Winzip, 7Zip, TugZIP etc. will read.
 * if you want to use that usb disk normally, you'll have to reformat it
 * But yeah, do what Rjwilmsi said; my hack is only for the mad and the desperate <tt>;(</tt> -- Finlay McWalter • Talk 09:54, 9 August 2009 (UTC)


 * You don't need a different file system or dangerous direct device access, you can use a file splitting program or a multivolume archiver that supports large files. You also don't need to buy a new USB stick this way. For example, using, type

dd if=bigfile of=bigfile.part1 bs=1M count=3800 dd if=bigfile of=bigfile.part2 bs=1M skip=3800
 * then move  and   to the other machine one by one on a USB stick of 4GB or more, then do   on the receiving side. I'm not completely certain that   will work with large files, in which case you can use   there too:

dd if=bigfile.part2 of=bigfile.part1 bs=1M seek=3800 ren bigfile.part1 bigfile del bigfile.part2
 * Or, using 7-Zip, do  on the sending side, then move   and   to the other machine one by one, then do   on the receiving side. That's a bit more reliable since you get a free CRC check at the end, but 7-Zip is less likely to be already installed on your machines.


 * I think it's a bad idea to use journaled filesystems on a USB stick as it will wear it down faster, so you should probably reformat to FAT32 when you're done with this in any case. -- BenRG (talk) 10:52, 9 August 2009 (UTC)


 * I suspect Windows will be unable to read something formatted as 'Mac OS Extended(Journaled)'. You might have better luck with a linux Live CD reading it.  Astronaut (talk) 02:38, 10 August 2009 (UTC)

Thanks for all your answers. It seems pretty complicated to me, I'm no expert. Is there no simple solution such as buying a USB stick that will work with both Mac and PC and allow files above 4GB?91.109.210.22 (talk) 13:23, 10 August 2009 (UTC)
 * There doesn't seem to be any such ready-made stick. But to use NTFS, all you have to do is follow [these instructions] on your PC to format the stick, and then install [this program] on your Mac. Then large files on the stick should "just work" on those two computers, and probably also other PCs.  On other Macs you will need to install the aforementioned driver. 84.239.160.214 (talk) 18:34, 10 August 2009 (UTC)


 * It's not the USB stick's fault, so buying a new one won't help. It's a deficiency of FAT32, one of many - FAT32 also has issues with character encoding in filenames, path lengths, and with file ownership and permissions, all of which are an issue if you're hoping to use FAT32 as a platform-agnostic transfer or backup format. Frankly there isn't a viable platform neutral disk format. So you're stuck with FAT32, or with installing an NTFS driver. -- Finlay McWalter • Talk 21:29, 10 August 2009 (UTC)

Thought I'd let you know how it went. I formatted the stick on my PC for NTFS (I got an error message from the PC saying it hadn't formatted it correctly but I ignored it) then downloaded the Mac NTFS 3G driver thing and installed it on my Mac. Then I put a 5GB file from my Mac onto the stick and put the stick into my PC and copied it over. It seemed to work ok. I will try a few more files, but for now it seems to have worked, thanks guysPopcorn II (talk) 15:11, 12 August 2009 (UTC) but its is not like dat

iTunes Library Transfer?
My old computer has officially kicked the bucket, but it went south while I was away and I couldn't make a back up of my iTunes Library. How can I get all the stuff (Apps, Music, Pictures) from my iPod Touch to my new laptop? I googled stuff like this but it all seemed to cost something. Help! Hubydane (talk) 13:39, 9 August 2009 (UTC)
 * Try to copy all files from the ipod (mounting it as a disk, then copying the files) and then start iTunes and choose to "import" all those files. I think that worked for me once, but that was an ipod 5.5g and I think it only had music (no pictures and stuff) Jørgen (talk) 20:43, 9 August 2009 (UTC)
 * Another thing you can try is a program called Senuti (iTunes backwards). It looks and works just like iTunes, but in reverse. I used it once to do what you describe and it worked very well. ··· 日本穣 ? · 投稿  · Talk to Nihonjoe 21:56, 14 August 2009 (UTC)

heterogeneous linklist
How to implement a heterogeneous link list in C/C++? —Preceding unsigned comment added by Chetan496 (talk • contribs) 13:45, 9 August 2009 (UTC)
 * Are you familiar with homogenous linked lists? - the principles are the same except that you will probably want to precede each data item by meta data describing the data type. It's probably that different data types will take up different amounts of space - so some data elements may be spread across more than one data cell (unless you use data cells the size of the largest element by default) To reference these you will probably want to use a void pointer (a pointer that doesn't have it's type defined), and use type casting to get the data from the dereferenced list data to type cast variables. You don't really need to use a void pointer assuming you know the lengths of the various data types, and don't have a problems chopping or sewing data together - it's probably easier to use the pre-made functions mentioned below though if that doesn't appeal to you. Potentially the compiler writers may or may not be doing it better than you...
 * An alternative is to use a linked list of variable sized cells.83.100.250.79 (talk) 15:03, 9 August 2009 (UTC)


 * In C++ you could use  or  . -- BenRG (talk) 16:53, 9 August 2009 (UTC)

This is probably a homework problem. Go read about tagged unions. --FOo (talk) 05:59, 10 August 2009 (UTC)

Problem with mounting in Linux, can't edit files
I've tried mounting the file with the options <tt>-o rw</tt> and <tt>-w</tt> but I still can't edit anything on the hard drive. I can mount the drive easily, I can read the files as well but I can't cut, delete, rename... or just write in general. This is my <tt>fdisk -l</tt>: and I mounted the drive using <tt>sudo mount -o rw /dev/sdc1 /media/500gb</tt>. Any idea what's wrong? It worked perfectly yesterday. --BiT (talk) 15:53, 9 August 2009 (UTC)


 * Questions:
 * with the above mount done, what is the output from just typing <tt>mount</tt>
 * ditto, what is the output from <tt>touch /media/500gb foo</tt>
 * ditto, what is the output of <tt>ls -al /media/500gb</tt>
 * have you tried <tt>fsck</tt> on the disk
 * -- Finlay McWalter • Talk 17:06, 9 August 2009 (UTC)
 * This is the output from <tt>mount</tt>


 * <tt>touch /media/500gb foo</tt> gave no output, and <tt>ls -al /media/500gb</tt> simply gives me a of the files... wait, the owner and group is root, is that the problem? Because when I use <tt>sudo chown baldur *</tt> it says that the operation is not permitted- even though I'm root! --BiT (talk) 17:19, 9 August 2009 (UTC)
 * Oh an another thing, since I'm Icelandic some of my files had Icelandic characters (take for example a directory named 'Elín'). How ever since the drive became read-only, all of the Icelandic characters have turned into black diamond question marks (so 'El�n'). Why would that happen? --BiT (talk) 17:28, 9 August 2009 (UTC)
 * I would try scandisk on the usb disk on your windows machine (I've seen cases where a corrupt FAT32[vfat] disk mounts okay on linux, but then behaves strangely). -- Finlay McWalter • Talk 17:42, 9 August 2009 (UTC)
 * I formatted the drive with GParted but then it still wouldn't work, but everything was ok once I restarted the computer for some reason. Thanks for your help though, I didn't know about the "just <tt>mount</tt>" command. But for future references (since I've had the problem of a drive being read-only) what should I do if want to mount a drive as read, and writeable? Should adding the option <tt>-o remount,rw</tt> to the <tt>mount</tt> command work? --BiT (talk) 19:43, 9 August 2009 (UTC)
 * The remount thing means "if there's an error, here's what to do", and the line there reads "mount it read only". That's the safe thing to do, so you're not blindly writing to a bad drive with more stuff that might be making it more bad. So leave the remount at ro. That doesn't seem to have kicked in for you: the drive was mounted rw, which means the system hadn't seen an error. So it seems you hit a bug in the vfat driver. -- Finlay McWalter • Talk 19:47, 9 August 2009 (UTC)
 * Ah I see, I dislike the auto-mounter in Linux because I keep getting errors. Unless it would mount my drives properly I would much rather use the fstab or just mounting the drives by CLI.. --BiT (talk) 20:41, 9 August 2009 (UTC)
 * Fat32 doesn't have full unix permission sets, unlike NTFS, for instance. Try mounting it with a umask. This might work: mount /dev/sdc1 /foo -o umask=000 Shadowjams (talk) 03:09, 10 August 2009 (UTC)

Windows XP: folders with 32-character hex-digit names and a file called "$shtdwn$.req"
In the root directory of the largest disks of my windows PC, folders with 32-character names like "67b339f88b71042416304788faad5263" tend to accumulate. They contain a single binary file called "$shtdwn$.req", which is about 800 bytes, the first of which are "Sdwn", followed by a few binary digits, and the rest is just binary zeros. The folders are mentioned here, but the question remains: is there any reason to keep these, or are they just junk that can be deleted safely? --NorwegianBluetalk 17:25, 9 August 2009 (UTC)


 * From this discussion, it seems that the files are created by the Windows Malicious Software Removal Tool, but they shouldn't be left on the system, they should get deleted. You may wish to follow the instructions in the final post to that thread.  Do you regularly run Windows Update and other malware detection/removal tools?  -- LarryMac  | Talk  13:01, 11 August 2009 (UTC)


 * Thanks. The logfile shows that Windows Malicious Software Removal Tool is being run about once a month, see dump:


 * I wasn't aware that it was being run, as I cannot remember having requested this explicitly. I use AVG 8.5, which tends to start scanning when I'm not actively using the PC (maybe AVG invokes Microsoft Windows Malicious Software Removal Tool??). I usually have to abort AVG's scans, because scanning the entire system takes more than a day. The logfile shows that the security policy was adjusted sometime between March 15th and April 17th, 2009, and that after this date, the logs report "Security policy doesn't allow for all actions MSRT may require.". When sorting the Program Files folder by date, I find that the only installations performed in this period are from Microsoft:


 * The dates of the folders with the random-seeming names do not correspond to the dates that mrt.log reports that the Malicious Software Removal Tool was run. The only file in the folders is "$shtdwn$.req", none of the more ominous files mentioned in the thread you linked to are present.
 * Oh, one more thing that might be relevant, come to think of it... The disk where I've found the files is an ext3 volume, accessed from windows XP with the Ext2Fsd driver. --NorwegianBluetalk 18:13, 11 August 2009 (UTC)