https://wiki.archlinux.org/api.php?action=feedcontributions&user=Roobie&feedformat=atomArchWiki - User contributions [en]2024-03-29T10:46:33ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=D&diff=181461D2012-01-31T21:33:22Z<p>Roobie: Updated most of the content, so that it is up to date.</p>
<hr />
<div>[[Category: Development (English)]]<br />
= Introduction =<br />
<blockquote>The D programming language, also known simply as D, is an object-oriented, imperative, multi-paradigm system programming language by Walter Bright of Digital Mars. It originated as a re-engineering of C++, but even though it is predominantly influenced by that language, it is not a variant of it. D has redesigned some C++ features and has been influenced by concepts used in other programming languages, such as Java, C#, and Eiffel.</blockquote><br />
From [[Wikipedia:D (programming language)]].<br />
<br />
= Installation =<br />
To program in D you will need two things - a D compiler and a library. The official compiler is called DMD and is now available in arch's community repository.<br />
<br />
dmd is just the compiler, but also includes the standard library, which is called Phobos.<br />
<br />
The package dmd is version 2 of dmd, and can be installed from [community]:<br />
<br />
# pacman -S dmd<br />
<br />
This will pull libphobos in as a dependency.<br />
<br />
= Testing the installation =<br />
To make sure that everything is installed and set up correctly, a simple Hello World program should suffice.<br />
<br />
<br />
import std.stdio;<br />
<br />
void main() {<br />
string yourName = "archer";<br />
writefln("Hello %s!", yourName);<br />
}<br />
<br />
Paste the code into a file, name it hello.d, and run<br />
<br />
$ dmd hello.d<br />
<br />
in the same directory as the file. You should then be able to execute the program with:<br />
<br />
$ ./hello<br />
<br />
You can also execute<br />
<br />
$ dmd -run hello.d<br />
<br />
which will simply compile and run without leaving any object files in the directory.<br />
<br />
= Considerations =<br />
There are however possible choices regarding the compiler you choose. The standard is dmd, but GDC (GNU D Compiler) and LDC (LLVM D Compiler) are also popular. There are packages in the AUR for both of these should you find it interesting.<br />
<br />
The main difference is that the dmd's back end is not FOSS (licensed from Symantec), while the others compilers are completely FOSS, both back- and front-end.<br />
<br />
= Useful libraries, bindings, etc. =<br />
* [http://code.google.com/a/eclipselabs.org/p/ddt/ DDT] - Eclipse plugin for project and code management in D<br />
* [http://www.dsource.org/projects/qtd/ QtD] - Qt bindings for D<br />
* [http://www.dsource.org/projects/gtkd GtkD] - An object oriented GTK+ wrapper for D<br />
* [http://www.dsource.org/projects/derelict Derelict] - Bindings for multimedia libraries, focused toward game development<br />
* [http://www.dsource.org/projects/bindings Bindings] - A project that houses a lot of bindings to different C libraries<br />
* [http://www.dsource.org/projects/descent Descent] - An [[Eclipse]] plugin for programming in D<br />
* [http://www.d-programming-language.org/rdmd.html rdmd] - A utility that allows one to execute D files like shell scripts. [https://aur.archlinux.org/packages.php?ID=56070 In AUR]<br />
<br />
= Links =<br />
* [https://github.com/D-Programming-Language/phobos/ Phobos source on github] - The official Phobos repo<br />
* [http://dlang.org/ Digital Mars] - The official home of D<br />
* [http://www.dsource.org/ dsource] - An open source D community, hosts several open source projects<br />
* [http://planet.dsource.org/ Planet D] - A collection of blogs about D</div>Roobiehttps://wiki.archlinux.org/index.php?title=Java&diff=149904Java2011-07-25T09:04:21Z<p>Roobie: added note for problems with jdbc and default MySQL-settings not listening to any ports.</p>
<hr />
<div>[[Category:Other desktop user's resources (English)]]<br />
{{i18n|Java}}<br />
<br />
"''Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture.''" [http://en.wikipedia.org/wiki/Java_(programming_language)]<br />
<br />
==Installation==<br />
There are two Java Virtual Machines in the Arch repos that can be installed on your system &mdash; the OpenJDK open source implementation and Sun's closed source implementation. Arch recommends [http://openjdk.java.net/ OpenJDK.]<br />
<br />
===OpenJDK JVM===<br />
To be able to run Java programs, you can install OpenJDK from the repositories. This also installs a Java Development Kit.<br />
<br />
# pacman -Syu openjdk6<br />
<br />
You will likely need the icedtea-web for Java functionality in Firefox as suggested in this thread: https://bbs.archlinux.org/viewtopic.php?pid=895343<br />
<br />
# pacman -Syu icedtea-web<br />
<br />
{{Note | If you experience any problems with the Java plugin, you can try the solution suggested for the Firefox Flash plugin: [[Flash#Plugins_are_installed_but_not_working]]}}<br />
<br />
{{Note | If you use a non-reparenting window manager, you should uncomment the line in /etc/profile.d/openjdk6.sh (don't forget to export it also)}}<br />
<br />
===Sun JVM===<br />
To be able to run Java programs, you can install the Sun JRE from the repositories:<br />
# pacman -S jre<br />
<br />
You will need to log out and login again, or add /opt/java/jre/bin/ to $PATH to use the java bash command. <br />
<br />
To create Java programs, you can install the Sun JDK from the repositories:<br />
# pacman -S jdk<br />
<br />
{{Note | If you experience any problems with the Java plugin, you can try the solution suggested for the Firefox Flash plugin: [[Flash#Plugins_are_installed_but_not_working]]}}<br />
<br />
{{Note|For Sun Java, you will need to source /etc/profile in order to for the JAVA_HOME path to point to the correct place}}<br />
# source /etc/profile<br />
<br />
===BEA JRockit JIT JVM (+JDK)===<br />
You can also install JIT version of Java from the [[AUR]].<br />
[http://aur.archlinux.org/packages.php?ID=11190 jrockit]<br />
<br />
===Java sound with Pulseaudio===<br />
By default, Java and Pulseaudio don't get along very well with each other, but this is easy to fix using padsp.<br />
<br />
(These paths are correct for Sun's Java, you will need to change the paths for OpenJDK)<br />
<br />
First, rename the java binary to java.bin<br />
# mv /opt/java/jre/bin/java /opt/java/jre/bin/java.bin<br />
Then, create a new launcher script at '''/opt/java/jre/bin/java'''<br />
#!/bin/sh<br />
padsp /opt/java/jre/bin/java.bin "$@"<br />
Finally, make the launcher script executable<br />
# chmod +x /opt/java/jre/bin/java<br />
You will need to redo this process on each update of Java.<br />
<br />
You can also try replacing padsp with aoss, which can also fix it under standard ALSA as well as in Pulse, do what works best. I must warn everyone that these hacks sometimes work perfect, but are sometimes very unstable as well.<br />
<br />
<br />
==Additional notes==<br />
<br />
===MySQL===<br />
Due to the fact that the JDBC-drivers often use the port in the URL to establish a connection to the database, it is considered "remote" (i.e., MySQL does not listen to the port as per its default settings) despite the fact that they are possibly running on the same host, Thus, to use JDBC and MySQL, you need to edit '''/etc/mysql/my.cnf''' and comment out the line looking like this:<br />
skip-networking<br />
<br />
[https://wiki.archlinux.org/index.php/MySQL Read the article about MySQL for more information.]</div>Roobie