Jump to content

Wikipedia:Reference desk/Archives/Computing/2009 May 19

From Wikipedia, the free encyclopedia
Computing desk
< May 18 << Apr | May | Jun >> May 20 >
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 19

[edit]

Strange Japanese plug

[edit]

I have a Japanese mate and he used to connect his external CD drive to a plug that resembles a USB. The difference was that the plug was a square with a smaller square at its side. It was as broad as a USB. What is that?--80.58.205.37 (talk) 11:32, 19 May 2009 (UTC)[reply]

There are multiple types of USB plugs - If you live in Europe you will probally think of the Type A plug as "The USB Plug". However, there are several other USB plugs (Image). From your description i think that you mean the middle one in this image - a plug type B. Excirial (Contact me,Contribs) 11:48, 19 May 2009 (UTC)[reply]
Or maybe Firewire? Jørgen (talk) 13:16, 19 May 2009 (UTC)[reply]
A photo/drawing would be nice. F (talk) 13:22, 19 May 2009 (UTC)[reply]
Probably Firewire, but maybe eSATA? APL (talk) 16:28, 19 May 2009 (UTC)[reply]
Did you read our article? Universal Serial Bus? Oda Mari (talk) 04:54, 20 May 2009 (UTC)[reply]

autostart a crashed program

[edit]
Resolved

If a windows program crashes (and they often do) is there any way to have the computer restart the program automatically? —Preceding unsigned comment added by 82.44.54.169 (talk) 11:56, 19 May 2009 (UTC)[reply]

Nope. You'll have to restart it manually. The only exception to this rule is explorer.exe that automatically restarts if it crashes.  Buffered Input Output 12:43, 19 May 2009 (UTC)[reply]
To refine the answer by BufferedIO: There is no build in method to do this, but software (and freeware) is availible that will restart a program once it crashes. That type of software works trough minitoring the running processes. If a proces is terminated or unresponsive it will restart the proces. Some applications (Mostly security related though) have such functionality build in into them. Excirial (Contact me,Contribs) 12:56, 19 May 2009 (UTC)[reply]
Yes, this is exactly what I am looking for. Any suggestions for good programs to try? —Preceding unsigned comment added by 82.44.54.169 (talk) 12:58, 19 May 2009 (UTC)[reply]
Just found something, seems to be working well. Thanks

My friend says the plural of "mouse" is "mouses" when referring to computer accessories.

[edit]

I say he's full of crap. Who's right? What Is Moe? (talk) 13:04, 19 May 2009 (UTC)[reply]

Both Mice and Mouses are acceptable, see Mouse (computing)#Etymology and plural. Nanonic (talk) 13:10, 19 May 2009 (UTC)[reply]
ahh ec damn —Preceding unsigned comment added by 82.44.54.169 (talk) 13:11, 19 May 2009 (UTC)[reply]
How admirably succinct. If you want a longer and more involved arugment, with academic references and all, ask on the Language RefDesk. BrainyBabe (talk) 15:59, 21 May 2009 (UTC)[reply]

GNU Software

[edit]

Where can I download a precompiled version of GNU Chess thats ready to work after installing. When I d/l the files from GNU sites you have to have a compiler to install. So where can I d/l the program so that its already compiled and I can just install and play. Thank you. --Mudupie (talk) 14:03, 19 May 2009 (UTC)[reply]

The problem is that you can't take a program compiled for one system and run it on another system. So, you must state what system you are using to ensure that you are getting a program that will run. -- kainaw 14:50, 19 May 2009 (UTC)[reply]
Well, since this is not The Year Of Linux On The Desktop, I'm going to guess Mudupie is running Windows, and will want to visit the first link that appears when he Googles gnu chess windows download, which is this link at Sourceforge which has a Setup binary. Tempshill (talk) 15:21, 19 May 2009 (UTC)[reply]
This is the link you want: [1]. It's not from the GNU people, but I've used past versions myself. I never bothered to get Xboard running though. I normally would suggest googling for it too, but I remember it being hard to find. Shadowjams (talk) 20:01, 19 May 2009 (UTC)[reply]

English.dat

[edit]

Hi....I'm finding files called english.dat spread around some of my folders. What is this file for? Any worries? 69.180.160.77 (talk) 15:00, 19 May 2009 (UTC)[reply]

Which OS? Which folders? In C:\WINDOWS, C:\Users, or C:\Program Files? It sounds like a file with English strings of an application. --Andreas Rejbrand (talk) 15:21, 19 May 2009 (UTC)[reply]
Try to open one of the files in a text editor (e.g. Notepad). Then you might be able to infer from the strings which application created the files. --Andreas Rejbrand (talk) 15:22, 19 May 2009 (UTC)[reply]
Sorry, yes...Windows XP...and they seem to be placed pretty randomly. There's some in the My Documents folder, some in Program files. When you open them they contain: 28.03.09 09:56:08 passed .\HttpFunctions.cpp, 54. The content seems pretty static except for the last 2 didget number which seems to increment. 69.180.160.77 (talk) 16:47, 19 May 2009 (UTC)[reply]
The number appears to be referencing time, so the last number would be the seconds. My guess is that they are used by some program to keep track of time that has passed since an event. --Alinnisawest,Dalek Empress (extermination requests here) 00:38, 20 May 2009 (UTC)[reply]
I found similar files in my system. I found that it has something to do with Microsoft Word. Whenever I start the program, this file appears in the directory where the file is located. I am still trying to find out why at appears and what it actually relates to. --B. Hackett May 2010

Google Earth Resolution

[edit]

hi, just out of interest where in the world is the highest resolution on Google Earth? thanks,--Abc26324 (talk) 16:02, 19 May 2009 (UTC)[reply]

Can you please clearify your question? Do you mean the resolution of the program that is called Google Earth? Or are you asking where the highest resolution picture of earth would be? – Elliott(Talk|Cont)  16:12, 19 May 2009 (UTC)[reply]
If you mean best quality images, they tend to be cities and large urban areas. Countryside is usually poor quality —Preceding unsigned comment added by 82.44.54.169 (talk) 16:13, 19 May 2009 (UTC)[reply]

What place(s) in the world have the best resolution, i know its likely to be urban areas, but is there anywhere which has the most detail (i heard that Prague is quite good?)?--Abc26324 (talk) 16:29, 19 May 2009 (UTC)[reply]

My vote would be for Cambridge, Mass. Matt Deres (talk) 16:51, 19 May 2009 (UTC)[reply]
I've always been under the impression that 37°25′18.33″N 122°5′3.46″W / 37.4217583°N 122.0842944°W / 37.4217583; -122.0842944 wins. Cycle~ (talk) 18:49, 19 May 2009 (UTC)[reply]
I don't know whether 15°17′55″N 19°25′47″E / 15.298542°N 19.42974°E / 15.298542; 19.42974 wins, but it's awesome. Explanation here (also check out the locations in the comments). -- BenRG (talk) 07:47, 20 May 2009 (UTC)[reply]

Load pre-installed windows in VirtualBox

[edit]

Is there anyway to take a hard drive with windows XP pro already installed and run that under VirtualBox Without the BsoD? Or to at lease startup my own copy of winxp with the user profiles/settings/SAM files/programs from the windows on the hard drive? – Elliott(Talk|Cont)  16:08, 19 May 2009 (UTC)[reply]

Forgot to mintion, the host system is Ubuntu 9.04– Elliott(Talk|Cont)  16:25, 19 May 2009 (UTC)[reply]
What's the error message? I believe the problem is that windows xp makes a hash out of the hardware of your computer, and if that changes significantly such as moving to a completely different computer or vm it refuses to run as some sort of copyright protection —Preceding unsigned comment added by 82.44.54.169 (talk) 16:18, 19 May 2009 (UTC)[reply]
I dont remember the exact error, but i do believe you are right, is there a way to remove or reset that hash? – Elliott(Talk|Cont)  16:25, 19 May 2009 (UTC)[reply]
Windows licensing restrictions wouldn't cause it to BSOD. --wj32 t/c 10:40, 20 May 2009 (UTC)[reply]
Well, I heard a different explanation for this phenomenon. If there is significant hardware change, the drivers may not match up so Windows does not work. You can try an on-top reinstallation of Windows. (That's what I usually do after changing motherboards.)

Java: Reading from a File

[edit]

In Java, how can I read in a portion of a file beginning at byte number x of the file and ending at byte number y, where x and y are two numbers the user specifies? I need to extract information from a star catalogue, but can't read the whole thing into a byte array because it's much too large.

I'm a Java novice, so please keep your answers easy to understand. Thanks in advance. --Bowlhover (talk) 16:49, 19 May 2009 (UTC)[reply]

I dont know very much about java, but would it be possible to cut down the file with python first? – Elliott(Talk|Cont)  17:31, 19 May 2009 (UTC)[reply]
That's a very unhelpful answer. --Sean 17:51, 19 May 2009 (UTC)[reply]
sorry – Elliott(Talk|Cont)  18:10, 20 May 2009 (UTC)[reply]
You want to use a RandomAccessFile, seek() to x, then read y-x bytes with read(). There's also a readFully() call that will do it all for you in one go, but the previous instructions will work in most any language. --Sean 17:51, 19 May 2009 (UTC)[reply]
Never mind about readFully(); its offset is into the data, not the file. --Sean 18:36, 19 May 2009 (UTC)[reply]

evolution email misbehaving with linux

[edit]

Hi, I use linux, and evolution for my email. Some time back, I expunged my "Trash" folder (and my "Junk" folder), and for some reason they haven't been the same since. When I click on a message in my inbox and try to move it to a different folder, I can move it anywhere except "Trash" or "Junk". When I try to move the message, I get a list of available destination folders, and all the folders appear correctly, including "Trash" and "Junk", but when I click on either of those two, there's no response (the other folders work fine). Furthermore, when I delete something from my inbox, it stays in the inbox as a deleted message. I can choose the option "Hide deleted messages", and then they don't appear, but if I click "Show deleted messages", they appear with a strikethrough. I've tried googling the problem, and tried hunting through the "Preferences" list (and other places), but can't find anything. What's going on, and how can I fix this?? Thanks in advance, It's been emotional (talk) 17:02, 19 May 2009 (UTC)[reply]

If it's really confused itself, you could move ~/.evolution aside and re-import your mail. --Sean 18:00, 19 May 2009 (UTC)[reply]

repair cracked glass screen ipod touch with glue

[edit]

Can someone recommend a glue or paint like substance to seal cracks in the glass screen of an ipod touch ? so far as i can tell, the device (my sons) works; but I'd like to seal the cracks to keep water out and prevent further damage. Their are some car windshield repair kits that look close; any suggestions ? Judging from the number of internet sites offering repairs, a fair number of people have cracked glass on their ipod touch devices. The cost of repair is around 100 dollars, or you can buy the part and diy for around 40; however, the instructions available on the web , the repair is pretty difficult the first time you do it, when you don't know exactly what to do. —Preceding unsigned comment added by 65.220.64.105 (talk) 17:36, 19 May 2009 (UTC)[reply]

Well, cracked glass usually means the death of LCD panels - especially touch-sensitive panels. I would be quite surprised if there was anything much you could do to repair it. It's not just a matter of keeping water out. The system uses the glass in the screen as a capacitive layer that makes the touch interface work. It's hard to imagine how it could keep working if any of the cracks propagate all the way across the screen...and LCD display panels usually die completely after they get cracked. SteveBaker (talk) 23:39, 19 May 2009 (UTC)[reply]
I cracked my cell phone screen and put one of those stick-on screen protectors over it, which was good enough that I didn't bother pursuing a more complicated and expensive repair. However, you can also buy ipod repair parts from many places online. 207.241.239.70 (talk) 02:46, 21 May 2009 (UTC)[reply]

No wireless Internet even with strong signal

[edit]

Hi. A customer of mine has an antenna on his roof that he uses to get wireless. (He lives in the middle of nowhere and pays someone to share their wireless) The signal from the antenna is piped into his Dell desktop computer via a coaxial cable. That works great, but he also has a Gateway laptop that his wife uses. There's a crossover cable that runs from his desktop to a Belkin wireless router. Now, the laptop sees the signal from the router, and it can actually log into the router (192.168.2.1). The signal is strong, too, and the Internet and wireless lights on the router are solid green. But every once in a while, even though Windows says it's connected, the laptop stops loading web pages and it can't ping anything beyond the router. There's only one other wireless network in the area, and it has almost no signal. He says he's gotten it to work by just rebooting the desktop computer. I got it to work today by disabling and re-enabling the connection inside the desktop. Rebooting the router doesn't work. Changing the channel doesn't work, either. It has no encryption. He has two connections listed in the Network Connections folder on the desktop. One is wired and the other is wireless. I think the wired one is the connection to the router. One of them uses a static IP -- I think that's from the antenna on the roof. He actually expects me to fix this problem. His computer is acting weird (really slow, etc.) so I was thinking of re-installing Windows. Any other ideas? Thanks for any help. —Preceding unsigned comment added by WinRAR anodeeven (talkcontribs) 19:31, 19 May 2009 (UTC)[reply]

It sounds like you have enabled Internet connection sharing on the desktop computer. In my experience that is unreliable. It also sounds like you have a wifi card in the desktop computer, i am guessing that the coaxial cable is connection to that wifi card. What i think you might need, that will simpify things a little would be to get a wifi repeater[2][3], and have that connect directly to that antenna, then have both the laptop and desktop connect wirelessly. – Elliott(Talk|Cont)  20:07, 19 May 2009 (UTC)[reply]
I have another suggestion. Turn of the wireless router's DHCP. Then unplug the cross-over cable. Replace that with a normal ethernet cable but instead of plugging that in to the same plug on the wireless router, plug it in to a different plug, any plug but the one labled "WAN"(unless you only have one plug, in that case; same plug). See, the way i think you have it set up is that the desktop will give your router an ip address. Then the router, acting as a DHCP server will give your laptop an ipaddress. In by-passing the router's DHCP i hope this will fix it for you, If it does not then you might have to do the first thing i suggsted. Best of luck! – Elliott(Talk|Cont)  20:07, 19 May 2009 (UTC)[reply]
ok. Thanks Elliott. I will try your suggestions tomorrow. Right now, the crossover cable is plugged into the "Internet" jack on the router. I have a spare CAT 5e cable that I will connect to one of the other jacks. I will also disable DHCP in the router.--WinRAR anodeeven (talk) 20:21, 19 May 2009 (UTC)[reply]
From what your describing; that might or might not fix the problem. If i where in your place, before i bought a repeater, heres what i would do.
  • Disable Internet connection sharing on the desktop.
  • Assign an ip address to the wired connection on the desktop. (leave everything blank except the 'IP address" and 'Subnet Gateway')
  • keep the DHCP turn off on the router.
  • Download, install and setup privoxy on the desktop, and bind it to the same ip address that you choose for the desktop's wired connection.
  • Assign an ip address to the wireless connection on the laptop in the same rang as the desktop but set the 'Default Gateway' as the ip address you set on the wired connection on the desktop. (leave everything blank except the 'IP address', 'Subnet Gateway' and 'Default Gateway')
This would be done after you re-configure your router to pass DHCP requests to the desktop (my second suggestion)
This is just what i would do. Its kinda complecated if you dont know excatly how to do it. but it should work reliably. – Elliott(Talk|Cont)  20:36, 19 May 2009 (UTC)[reply]
And by all means, do not rule out reinstalling windows. It is a good idea if the computer is running slowly and acting weird. – Elliott(Talk|Cont)  20:49, 19 May 2009 (UTC)[reply]
I'm worried that his ISP has assigned him only one IP address. Hence the static configuration for the wireless connection on the desktop. So, could I give the wired connection on the desktop the same IP address as the wireless one? And could I tell the router to use that same IP address, as well? I used to use Privoxy to filter ads (I now use IE7 Pro). I would start it and configure the browser to use the local host as the proxy. But, are you suggesting that I route all network requests through it? Sorry for the confusion. I don't know much about Privoxy beyond browser applications.--WinRAR anodeeven (talk) 07:03, 20 May 2009 (UTC)[reply]
Yes, i am sure that his ISP only gave him one ip address. The only modifications i am asking you to do is to the wired connection on the desktop, and the wireless connection on the laptop. As for the ips, If you assign the ipaddress to the wired connection on the desktop as 192.168.1.3 then set the ip address on the wireless on the laptop as 192.168.1.4, then set the ip on the router to 192.168.1.5. On the laptop set the default gateway to 192.168.1.3. This is a complex setup. Without being there poking the computers myself it is hard to say that this will work or not.

This is how i think you have it set up right now. – Elliott(Talk|Cont)  16:03, 20 May 2009 (UTC)[reply]

Just to clearify, I think that you should try to reinstall windows first. If the problem continues, then remove the cross over cable and replace it with a normal cable as i said above. If that does not work then reconfogure the setting on the desktop, and laptop. If that does not work then you need to set up a wifi repeater and place that closer to his neighbores house. If that does not work then the problem is with his neighbores setup. By the way, McGyver is my hero :)– Elliott(Talk|Cont)  16:14, 20 May 2009 (UTC)[reply]

How to use a Windows Mobile 6.1 Cellphone as a modem for a Windows Mobile 2003SE PocketPC

[edit]

A few days ago, I got a hold of a Fujitsu-Siemens LOOX 720 PocketPC running Windows Mobile 2003SE, and because this PocketPC lacks a GSM module, I want to use my HTC Oxygen smartphone running Windows Mobile 6.1 (flashed it myself) as a Bluetooth modem. Can anyone please tell me what must I do, so I can use the HTC as a modem for the PocketPC? —Preceding unsigned comment added by 79.113.188.222 (talk) 19:50, 19 May 2009 (UTC)[reply]

Mouse issues

[edit]

Hello, i seem to be having some problems with my mouse. Here is some background information, the mouse is a logitech cordless trackball model number Y-UT76. The mouse pad is a 11.5 inch X 8inch World of Warcraft mouse pad, very flexible but not very stretchy. I am working on a Dell notebook running windows vista business, dual core 1.2GHZ with 2 gigs of ram (and a 4 gig flash drive acting as readybost). I have a 3Mb connection through Comcast. My office is 13 feet X 13 feet X 15 feet. I have a 22inch monitor. There is a ESI phone sitting next to my computer and it seems like it is plugged in to the network cable. My problem is this: My mouse courser is on the far left side of the screen, while my mouse has reached the right end of the mouse pad. I cant move my mouse any more to the right. I have no idea what to do. my secretary suggest that i need a mouse pad upgrade but i really dont want to spend the $800 for a new mouse pad. What can i do? —Preceding unsigned comment added by 64.172.159.131 (talk) 20:59, 19 May 2009 (UTC)[reply]

WP:Troll? As i must WP:AGF i will suggest that you stop by your local eletronic store, talk to a rep there and see if he can help you find a cheeper mouse pad to meet your needs. – Elliott(Talk|Cont)  21:07, 19 May 2009 (UTC)[reply]

use the table —Preceding unsigned comment added by 82.44.54.169 (talk) 21:30, 19 May 2009 (UTC)[reply]
You'll need a longer mouse cable too. SteveBaker (talk) 21:58, 19 May 2009 (UTC)[reply]
Lift up the mouse and replace it on the middle of the pad. But if you really want to buy a new mouse pad, I will sell you one for half that $800. SpinningSpark 22:27, 19 May 2009 (UTC)[reply]
We really need to know the motherboard type before making rash suggestions. Either way I recommend switching to Linux, you can control the mouse "courser" with your mind. 161.222.160.8 (talk) 22:52, 19 May 2009 (UTC)[reply]
Your secretary is clearly trying to stiff you. Go organic! Instead of spending money to help big corporations pollute our children's air and water, use recycled materials such as wastepaper or used napkins. Remember, it's for the children! --Alinnisawest,Dalek Empress (extermination requests here) 00:36, 20 May 2009 (UTC)[reply]
Have you tried rebooting without saving your files?Matt Eason (Talk &#149; Contribs) 03:27, 20 May 2009 (UTC)[reply]

Perhaps you'd be happier with one of these special graphics-laptops that don't even need a mouse? SteveBaker (talk) 14:00, 21 May 2009 (UTC)[reply]

Everyone complains there is not enough data provided for technical questions. Finally someone gives details, and what happens? I am glad to see the size of the office mentioned. That might be the problem. Such a small space may not have adequate cross-ventilation, causing dust to settle. (1) unplug, wipe and replace the USB plug for the mouse receiver. (2) wipe down the whole unit, with isopropyl alcohol or a cloth just dampened with window cleaner spray. Do the mouse pad, too, while you're at it. (3) remove the trackball and clean it, as above. Blow out the socket. (4) overnight, invert the mouse pad over the mouse, to keep both the mouse and the top surface of the mat protected against dust. KoolerStill (talk) 19:28, 21 May 2009 (UTC)[reply]

Programming language help

[edit]

I'm looking for a proceedural, and imperative programming language (capable of being compiled). It looks like I have many options to choose from - that isn't my main question. The problem I have is graphics output - specifically as part of what I'm doing I would like to output some 'results' graphically, specifically to Windows (XP) so probably through the windows API - all I need is the ability to open a window and 'plot' pixels to it. (Any other features such as directX or openGL support would be good but not essential).

So what I'm asking is for suggestions - I don't really want (or maybe even need) to learn a lot to do this - so as simple support for this as possible would be good. I don't even know where to begin to look for this, or how exactly the windows API would be integrated - maybe I just need to learn a small amount of the windows API, plus having the ability to call a windows API 'call' through the compiled code.

Is that clear? (I would pay for the program - though cant afford the thousands or many hundreds for the professional products such as the Intel Fortran compiler. Thanks.77.86.67.245 (talk) 23:28, 19 May 2009 (UTC)[reply]

I am a fan of Microsoft's XNA Game Studio. You write your code in the C# programming language. Technically, the code is not compiled into machine code; it is compiled into a .NET assembly and then that gets run with a JITter. But I don't think that will impact what you want; the end user will still double-click a file to run it. XNA GS has plenty of interesting graphics calls, as it has an emphasis on game development; but you can write any kind of software with it. It sounds like you need 2D output and doing so and plotting pixels is easy. The whole thing is free, also. Here is the download link and if you Google "XNA Game Studio" then you'll find out about available resources, sample code — you should start by taking some existing sample code and modifying it. Note that XNA GS can be used to build games for the Xbox 360; you can ignore all that sort of content and just write your software for the PC, running in a window. Tempshill (talk) 23:54, 19 May 2009 (UTC)[reply]
If you just want to draw pixels then GDI+ will do fine. Also, why would you care about what programming language you use? The standard for Windows programming is C, and if you want something easier to use try C#. --wj32 t/c 10:39, 20 May 2009 (UTC)[reply]
I care what programming language I will use because I will have to use it, and I find simple languages designed to be proceedural easy to use. In other words - FORTRAN, proceedural versions of BASIC, maybe ALGOl, and Pascal where the types I was thinking of - all of which are available with compilers.

Can someone point me in the right direction as to where to begin as to incorporating graphics calls into compiled programs.? GDI+ sounds right - so how would I incorporate it—Preceding unsigned comment added by 77.86.67.245 (talk) 11:16, 20 May 2009 (UTC)[reply]

If you like Basic, then look through this List_of_BASIC_dialects_by_platform#Microsoft_Windows and decide what suits you best. 89.242.109.25 (talk) 13:07, 20 May 2009 (UTC)[reply]

OK I'm not really getting an answer - let me ask another way - suppose I choose Free Pascal or any other compiler language - is there a standard way of incorporating graphics routines into the program - does this depend on the compiler what will or will not be possible - and is there a standard way to access openGL/DirectX commands independent of what programming language I'm using - ie what is the most basic 'wrapper' for graphics commands and routines that can be used independant of whatever language I'm using? —Preceding unsigned comment added by 77.86.67.245 (talk) 13:43, 20 May 2009 (UTC)[reply]

I think your confusion revolves around the idea that graphics "commands" are a part of the programming language - and therefore the compiler. In fact, (other than in ancient BASIC interpreters running on Sinclair ZX80's and such) the graphics interface is just a set of functions in a library that you link to. These things are generally written in C or C++ - so unless you want to program in those languages directly (which isn't such a dumb idea) - you'll have to find either a set of wrappers for those libraries in your chosen language - or you have to find out how to call C/C++ functions from inside the language of your choice. But if you were to choose C++ as your compiled language - then it's simply a matter of including the definitions of those functions into your code:
  #include <GL/gl.h>   // Include OpenGL function definitions
...and linking to the OpenGL library. Precise details of how you do that would depend on your choice of C++ compiler and what operating system you use. In Linux, with GNU's g++, it's as simple as sticking '-lGL' on your compile command. Generally, you'll have to jump through some hoops to open a window and set up and event loop - and that'll entail dragging in more header files and libraries but those kinds of things are well covered in example programs you can find all over the Internet. SteveBaker (talk) 19:00, 20 May 2009 (UTC)[reply]
I think that what the OP is missing is the concept of an API. Just about any development environment that runs under Windows will incorporate the API for Windows graphics calls. When using this API, you'll use the exact same logic no matter what language you end up using. By the way, I still think you should use C# and XNA Game Studio. Tempshill (talk) 20:09, 20 May 2009 (UTC)[reply]
Don't most modern languages usually have many graphics commands of various kinds built in already? As far as I recall, even with ancient gwbasic you could draw lines on the screen and so on. 78.146.198.122 (talk) 21:46, 20 May 2009 (UTC)[reply]
Unfortunately no. Modern GUIs have terminal/console windows that emulate ancient text-only screens and almost all languages can run in the terminals and have built-in equivalents to PRINT, but they skipped over the GWBASIC full-screen graphical days. Which is a shame, because it was fun to switch into graphics mode with one command and draw lines with the second. To draw graphics in a windowed application you have to create the window, run a message pump so that it responds to events (like resize, close, repaint), and handle repaint requests by redrawing everything in the window. It's a fair amount of busywork. GLUT might be a good choice; it's a very simple library that just creates a blank window that you can issue OpenGL commands to. Most people think of OpenGL as a 3D library but it also has a full set of 2D commands, and it's easy to use, at least for simple things. This sample program just opens a window and draws a triangle in it (and redraws the triangle whenever the system requests it, and recalculates the coordinate system when the user resizes the window—you're still responsible for that stuff). I've only used it from C++, but a search for "glut bindings" turned up a bunch of hits. -- BenRG (talk) 10:36, 21 May 2009 (UTC)[reply]
So things have gone backwards regarding graphics? That's bad. There must be some Basic variants somewhere that offer simple graphics commands. I hate these split-pane things. What about Logo (programming language)? 78.146.67.27 (talk) 11:41, 21 May 2009 (UTC)[reply]
It's NOT backwards - it's forwards!! With gwbasic, the ONLY way to draw a line was with that command. If you wanted to draw a line that's 'depth cued' (foggy) or whose color varies from one end to the other or which has rounded ends or use your 3D graphics hardware to draw 20 million lines a second...bad luck - that's not what gwbasic did - and that's that.
With graphics being an external library that's called using the language's standard function call syntax - you have a choice of API's and you can add new graphics features without having to rewrite your compiler and add new syntax. Think about it: The C language was invented in the 1970's - 3D graphics hadn't even been invented then! We didn't get 3D graphics in hardware until the 1980's - and not on PC's until the 1990's. If we were stuck with some kind of built-in graphics commands in C, we wouldn't be able to use it to write super-modern stuff like computer games and web browsers.
The single biggest innovation in C was to abstract out the I/O "commands" into libraries that could be added or removed as needed. In Pascal (for example) you use a special 'command' (that the compiler has built-in) to print a string to the screen - but in C you typically use 'printf' - which isn't a part of the language at all - it's a 'stdio' library function and it can be replaced if needed. The version of C that I use to program my Arduino single-chip computer doesn't even have a 'printf' because there is no screen attached to it (and printf would take up too much valuable memory).
Besides - what does it really matter that you have to say "#include <GL/gl.h>" at the top of your program and add "libGL" to the list of libraries you link to? That's two lines of extra 'stuff'. Then you have functions with parameters that you're already very familiar with - rather than special syntax that you have to learn. How would you (say) render a textured, Z buffered triangle using vertex and fragment shaders in gwbasic? You couldn't - it simply didn't have the syntax for that - yet I can do it with the OpenGL or Direct3D libraries (I even have a choice!) in a language that's WAY older than gwbasic.
Furthermore - look at it from another perspective - there are literally hundreds of programming languages out there. When a company like (say) nVidia adds a major new concept like shaders to their graphics hardware, in your world, they'd have to go to the authors of all of those hundreds of compilers and interpreters and tell them "Hey - you need to add a dozen new commands to your languages to take advantage of this major new feature"...versus adding it to one library that any of those languages can link to with zero change.
SteveBaker (talk) 13:54, 21 May 2009 (UTC)[reply]
Being able to choose a library is a step forward, but having no standard graphics is a step backward. The standard library is part of the standard. I wish C did have some basic graphics support in the standard library, where you could rely on its always being there. After all, it has fopen() and printf() and the like, and they aren't necessary—you could always write your own I/O library on top of open() or CreateFile() or whatever your OS provides, or use one of the zillions of mutually incompatible cross-platform libraries that would inevitably spring up—but it's awfully convenient to not have to do that when the support included in the standard is good enough, which it frequently is. Well, maybe OpenGL is standard enough to qualify here. The other thing is that it's much harder to "clear the screen and draw a line" in OpenGL than it was in GWBasic. In GWBasic it was two commands, one to clear the screen and one to draw a line. Now you have to worry about the message loop and redraw events. I think there's a niche for a "just create a window and draw in it" library. -- BenRG (talk) 18:48, 22 May 2009 (UTC)[reply]
freebasic looks like it would be useful to you - it's got all the old plot,line and circle commands, and can be compiled as well(so speed shouldn't be an issue) - I've found the same problem too though - there's a lot of 'dump' needed to be learned for stuff like java just to "colour 255,255,0:plot 0,0" - it's ofputting...77.86.10.194 (talk) 00:20, 26 May 2009 (UTC)[reply]

(OP) Yes I was asking what SteveBaker said - problem - some possibly useful languages to me (such as free basic) - say they can support opengl, and directx - but can't find much info... Obviously opengl is a different language - so I imagine that there will be a system call to it - but do different languages handle the calls in the same way - or are most the same - due to a lot being written in C at the base level?

In other words I'm confused about the way a generic language communicates with the graphics language. It's become clear that some simple languages don't support opengl/directx , but most do - however I've no experience of either - so I'm not able to recognise what is and isn't a standard implementation. (I don't really want to learn opengl as described in a C++ book and then find the calls are implemented in a syntactically different way!)

Which brings me to dilemma number 2 - opengl or directx - is there any real reason to care about either - or should I just toss a coin, or learn both?77.86.10.194 (talk) 00:20, 26 May 2009 (UTC)[reply]