I need to known in which language (or locale) the current OS is running.
Or, at least, in LWJGL. I have searched a lot, and do not found anything.
You can get the Language like this:
java.util.Locale.getDefault().toString();
If you are looking or localizate your libgdx projects. This works wonders:
http://siondream.com/blog/games/internationalization-for-libgdx-projects/
Related
I am creating a kbskit for my tcl executable application as follows on Suse :
./kbs.tcl -builddir=85 -r -mk-bi -bi="itcl3.4 itk3.4 iwidgets4.0.2 img1.4.1" install kbskit8.5
cp 85/bin/kbsmk8.5-bi kbsmk8.5-bi-run
./kbsmk8.5-bi sdx.kit wrap sim -runtime kbsmk8.5-bi-run
The application will be used on several flavours of linux like Redhat,Ubuntu etc. I am trying my best to test it myself under many combinations. Neverthless, i would be like to know someone thinks this would/wouldn’t work seamlessly across different platforms since I wont be able to cover all combinations exhaustively.
A Linux/x86 kbskit is at least reasonable to run on that collection of platforms. Unfortunately, the only way to be sure is to try. It should work, but if your script refers to files in a particular location and another platform (or deployment!) puts them elsewhere, then things will fail. The other thing that might go wrong is if there are significant incompatibilities in the small number of system libraries that Tcl uses, especially the C library; I do not know whether such problems exist, but I suspect they're not a major problem in practice.
You can try using the platform package (a standard part of Tcl since at least 8.5) to report what platform you're dealing with. That's the usual level of granularity you need to pay attention to.
package require platform
puts [platform::identify]
I've used qemu-user before to use arm binaries on an x86 machine, but I wonder, is it possible to use qemu-user or something similar to pre-translate binaries between architectures? I've been trying to look for something like this, but I haven't found anything yet. You would think since we can already dynamically translate binaries between two architectures, it would be relatively easy to do this translation ahead of time. Are there any technical barriers to this, has it already been done, or is it just that nobody has bothered to do this yet?
Imagine a 3-dim putty - a polyhedron which every facet is a putty shell.
A few Qs:
1. Is there already such a thing?
2. How can I easily implement a cube/polyhedron that rotates freely, so that on each facet - I can decide what to show (for example, a putty shell). I really don't want to dwell on the graphics part, unless I have to. So any easily prepared graphic would be nice, as long as it supports my requirement. Can openGL help me? JOGL? HTML5? (I don't mind it being in a browser)
Really weird question, not even sure it belongs here, but seems fun anyway...
Have a look here : http://www.jukie.net/bart/blog/popenRWE
So I'd say : start a bash instance with this variant of popen which handles both writes and reads, use the pipes for input and output, forward keyboard strokes to input, and render the output in OpenGL, probably in a rendertexture.
Repeat for each side...
Not html5 or jogl, though. Plain old C or C++.
Compiz's Desktop Cube and six fullscreen Xterms.
I am in the process of building interactive front-ends to a
distributed application which to date has been used to run workloads
that had a batch-job like structures and needed no UI at all. The application is mostly written in Perl and C and runs on a mix of Unix and Windows machines, but I think this isn't relevant to the UI.
The first such frontend is going have a command-line user interface --
currently, I envision something similar to the CLIs of the Procurve
switches and Cisco routers that I have worked with.
Like modern network gear CLIs, commands are going to resemble
simple sentences, (i.e. show vlans ports 1-4) and the CLI will
have some implicit state, much in the way that Unix shells and
cmd.exe in Windows have environment variables and current working
directories. Moreover, I'd like to implement great tab completion that
is aware of the application's state as much as possible and I want to be able to do that with as
little application-specific code as possible.
The low-level functionality (terminal I/O) seems easy to implement on
top of GNU Readline or similar libraries, but that's only where the
real fun starts. So far I have looked at the Perl modules
Term::Shell
and
Term::ShellUI,
but I'm not convinced that I want to use either of them. I am still
considering rolling my own solution and at the moment I am primarily looking for
inspiration.
Can you recommend any application or library, regardless of
implementation language, that implements a good CLI from which I can
borrow ideas?
I suggest you take a look at the philosophy underlying Microsoft PowerShell. From the idea of piping typed objects between commands to the consistency of its commands and argument syntax, I think it can be a source of inspiration.
You could try having a look at libcli :
"Libcli provides a shared library for
including a Cisco-like command-line
interface into other software."
http://code.google.com/p/libcli/
BTW - I forgot to mention that it is GNU Lesser GPL and actually used by Cisco in some products.
As for your last sentence/question, I'm particularly fond of zsh completion and line editing (zle).
If one wanted to program a game in an unusual language, but no library or functions exist to manipulate graphics, how would this be accomplished? By writing your own low level routines?
You are standing by a house. A road runs off to the east, and south there is a narrow path leading around the back of the house.
There is a mailbox here.
What do you do? _
By interfacing to OpenGL, it's graphics-card independent API.
For a concrete example of what that means and how it's done, have a look at the OpenGL bindings for Python
Look here for bindings to other languages.
Why do you have to do this?
Well, graphics programming is highly dependent on the hardware (i.e. graphics card), and there are many of them. OpenGL is the standard language that they all understand. (I think the same can be said about Direct3D, but that's owned by Microsoft, while OpenGL is more open).
Find out how it interfaces with C libraries, then use that to make an interface to OpenGL, DirectX, or OpenAL. Alternatively you can port something else, like say SDLlib. In a weird case you might want to embed a language that has the library you'd like. Say if it's Java3D and you want to compile it with Mono 2.2. I'm not sure that's even possible, but one of the mono-project changes is Java support. Of course on Mono you have other game library options.
If you plan to use graphics hardware, you need to have its drivers and OpenGL or DirectX.
If you're programming this for some exotic piece of limited hardware, there's only so much you could do. If you're simply not given access to draw to the screen other than in some extremely limited manner (perhaps all you can do is render a string of text), then there's nothing you can do.
If you're doing this on an ordinary computer but your language of choice simply doesn't have any OpenGL or DirectX bindings, then you'll need to write some yourself.
Conventional wisdom would suggest to "use the best tool for the job", if there are no existing libraries to manipulate graphics for your language, it's likely not the best tool for the job.