Wiki source for ProgrammingLanguages

Show raw source

[[HomePage]] > [[ComponentHowTo Components and HowTos]] > [[HowToProgramming Programming]]

====Which Programming Language?====

==So what is a programming language anyway==
~[[ Programming Languages]] are how people give instructions to the computer.
Puppy has a few built-in, and more can be added

==Overview of Languages included in Puppy==
~- C - Many programs are written using C. Plus they don't need any interpreter
~- Bash Shell Scripting - Is used extensively in Puppy.
-- other languages in Puppy devx.sfs are Bacon, [[CPlusPlus C++]], Vala and Genie
~- Note: Puppy can run programs made with these languages, but to write with them you may need other files.

==={{color text="Different Types of Languages" c="black"}}===
The code that a computer executes is **binary**, 0's and 1's. Humans have great difficulty creating such code directly so we use programming languages to create the binary code.
**Assembler** is a symbolic language humans use to represent each computer instruction, one at a time, which is translated into binary code
**Macro** Assembler uses more powerful constructions that can generate multiple machine instructions from one line of code
**Interpreters** are high level languages that are translated and executed line-by-line. This is a quick way to develop a program, but the execution is not as efficient. (examples are Java, Ruby, and Python)
**Compilers** are high level languages that are translated into computer code for later execution. (examples are C, [[CPlusPlus C++]], Fortran and compiled BASIC's) [[Compiling Compiling Help]]
~ The development process may be slower and more tedious, but this maximizes execution speed.
**Shell Scripting Languages** are not compiled and are a subset of Interpreted Languages. They are used throughout puppy for many tasks and programs. (examples Bash, Ash)

==={{color text="Common Languages" c="black"}}===
~- C is very common for programs using the Gtk toolkit (the Gnome equivalent of the ""Win32"" API).
~- [[CPlusPlus C++]] is very common for programs using the QT toolkit (the KDE equivalent of the ""Win32"" API).
~C and [[CPlusPlus C++]] are the core languages used for writing Linux itself.
~- Python, Perl, Ruby, Java - are not used by Puppy but may be used by some applications. Including them in Puppy would make Puppy bloated.
~- Shell Scripting (Bash/ash) - Puppy uses the bash-shell for a lot of its scripting needs.

==={{color text="Other Languages" c="black"}}===
~- ""LuaProgramming MurgaLua"" - Based on ""LuaProgramming Lua"", [[ Overview of Lua on wikipedia]]
~ Puppy used Murga Lua starting in 2.16 for a few versions to include a potential [[ control panel]].
~~- ""LuaProgramming MurgaLua"" is a scripting language that provides nice GUI's, Networking, Databases & XML in a small runtime (about 500k).
~~- Lua makes it easy to create rich applications easily (preferably with a GUI builder)
~~- Lua can deploy to both Linux and Windows with no changes to the code.
~~- Lua isn't a completely cryptic and propriety language.
~- ""TclTk"" ""Tcl/Tk"" - used in several Puppy's for The drive mounter MUT.
~- Freebasic is an open source BASIC compiler [[ wikipedia link]] but has been replaced with Bacon

==={{color text="Examples of Programming Languages (mostly in Puppy)" c="black"}}===
**PuppyBASIC** - ""PuppyBackground"", ""PBcdripper"", ""Puppysearch"", ""PBrename""
**""TclTk"" ""Tcl/tk""** - ""Tkdvd"", ""Pvolume"", ""TKmines"", ""TKdiff""
**Perl** program using Gtk:
**Java** - [[ jrisk.pup]]
~- java is not that commonly used in Puppy but there are some nice applications which would work.
**Shell Scripting** - Puppy makes intensive usage of the scripting capabilities of the [[bash bash-shell]].
examples: Network wizard, Pmount, Soxgui, Grafburn, Pfind, Pbackup
**C with GTK1** - Gcrontab, Gtkfind, Gtksee, Dillo, SSH gui, Turma, uxplor, xpdq, Xproc.

==={{color text="Contributing to Puppy" c="black"}}===
Currently there is no formal method to contribute code to Puppy. If you want to contribute code just make a post on the forum.

==={{color text="Getting Started Actually Programming in Puppy" c="black"}}===
If you want to program in C then you will need devx_.sfs in just click on GNU compiler devx in Puppy 5.3.1 Slickpet
See [[Compiling]] for more info about setting up your environment.
**PuppyBasic** - you're pretty much all set, just check the PuppyBasic page for more help

IDEs: (Integrated Development Environments)
KDE has Kdevelop
Unfortunately, KDE is quite huge, so not by default in Puppy.
This might be a good alternative (no package yet):
Qt Designer can use QT without the additional KDE libraries.
KDE is a desktop based on QT, but also requiring additional libraries.
An example for a QT application without KDE libraries is the web browser Opera.

A "classic" way to write programs for Puppy would be C / Gtk.
Tutorials see
There also is a "visual" tool: which is in the devx
An enhanced editor/IDE without visual designer:

for a gui designer for tcl there's visual tcl:

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki