Hello World!

Any other programming language that is not covered in the Web Scripting category.

Postby mm_freak on Sun Sep 25, 2005 9:22 pm

Dead. =P
I'm x^10 + x^8 + x^5 + x^4 + x^3 + 1, so don't mess with me!
mm_freak
Moderator
Moderator
 
Posts: 635
Joined: Sun Sep 11, 2005 12:29 pm
Location: Baden-Wuerttemberg (Germany)

Postby goose on Tue Sep 27, 2005 9:32 pm

DeeBG wrote:And just for any sadist out there who wants more, Wikipedia provides a good list of "Hello World" examples from an even wider sampling of languages here.


Wow.. that was coolest thing I've ever seen on Wikipedia..
did notice it wa missing some scripting languages..

Expect
Scotty
Scenarios

but who the hell uses those??
goose
Contributer
Contributer
 
Posts: 69
Joined: Tue Sep 27, 2005 7:05 pm
Location: United States

Postby mm_freak on Thu Sep 29, 2005 3:41 am

goose wrote:but who the hell uses those??


Most of them are classic or esoteric languages. Only a small subset of them are used today and an even smaller subset is used seriously. Have a look at Malbolge. =)
I'm x^10 + x^8 + x^5 + x^4 + x^3 + 1, so don't mess with me!
mm_freak
Moderator
Moderator
 
Posts: 635
Joined: Sun Sep 11, 2005 12:29 pm
Location: Baden-Wuerttemberg (Germany)

Postby bart416 on Fri Sep 30, 2005 7:41 pm

thebeast wrote:Nice one to read is very interesting how to program in different languages Hello World Smile In this year of study i'll learn how to program in Assembler becouse i'll must prepeare a course project whit some microprocessor which is programable whit assembler Smile

Loads of people say assembler is death.
But they forget that assembler is used to controll hardware like graphics cards Smile

C can't controll a graphics card without usage of libraries.
And gues what those libraries use, assembler.

So finaly i have a prove that i'm not the only one that is trying to learn assembler.
(eventough i'm learning Z80 assembler Razz )
bart416
Valued Member
Valued Member
 
Posts: 164
Joined: Fri Sep 30, 2005 6:50 pm

Postby goose on Sat Oct 01, 2005 1:11 am

mm_freak wrote:
goose wrote:but who the hell uses those??


Most of them are classic or esoteric languages. Only a small subset of them are used today and an even smaller subset is used seriously. Have a look at Malbolge. =)


lol.. Some of the long fiber multiplexers use those still. Teleco's are so slow to upgrade long haul software. Promina/IDNX multiplexers for example use all three of them
goose
Contributer
Contributer
 
Posts: 69
Joined: Tue Sep 27, 2005 7:05 pm
Location: United States

Postby vukasin on Tue Feb 07, 2006 8:56 pm

i started learning asm at the frist year in high school, and im learning it till now.

not because i need it so much, but because i like it (all my school mates telling me that im the only person who loves assembler).

DOS is not dead, i have it like a primar system on one of my home PCs and it works fine

also, im using DOS for writing programs in C (i dont know why, remindes me unix programing, i guess).
just me
vukasin
Contributer
Contributer
 
Posts: 20
Joined: Tue Feb 07, 2006 7:56 pm
Location: Prague, Cz

Hello world

Postby KnoWedGe on Wed Feb 08, 2006 5:25 pm

Nice job dude
KnoWedGe
Newbie
Newbie
 
Posts: 16
Joined: Wed Feb 08, 2006 3:20 pm

Postby binex on Thu Feb 09, 2006 7:48 pm

no delphi? Smile

uses
Messages, Forms;

begin
ShowMessage("Hello World!");
end;
or
begin
MessageDlg("Hello World!",mt_information,[mbok],0);
end;
binex
Newbie
Newbie
 
Posts: 4
Joined: Thu Feb 09, 2006 7:25 pm

Postby Aves on Thu Mar 23, 2006 8:07 pm

I can’t compile
Aves
Newbie
Newbie
 
Posts: 12
Joined: Thu Mar 23, 2006 7:54 pm

Postby wuffie on Fri Mar 24, 2006 2:40 am

mm_freak wrote:So DOS keeps being dead. =D

Dos isnt dead, its the base of Windows and I use it all the time for programs that dont have GUI's and in batch scripts so i dont have to click a hundred times to do something that takes 3seconds and 2 click with a .bat
besides if you cant use dos and ur into hacking ur pretty disabled! Confused

goncalopp wrote:Although HTML is a language, I don't think it is considered a programming language. You can't make programs with HTML (please correct me if I'm wrong, I'm not an "HTML programmer" Wink )


There are games coded entirely in HTML.... they suck arse to look at and usaly run like a 2legged dog but there out there, somewere. Wink
Im pretty sure one of them was a runescape sytle game...
so its as much a proggramming lang as java/java script is in my opinion Smile
no, that means I fit around you and you fit in me.

Im pretty sure she was talking about Hug's ^^
-_Minulla on finni perseessä_-
wuffie
Contributer
Contributer
 
Posts: 22
Joined: Tue Mar 14, 2006 11:16 pm

nice

Postby KriZstan on Mon Mar 27, 2006 7:09 pm

nice... looks good to me
Thanks,

KriZstan Z. Star
KriZstan
Newbie
Newbie
 
Posts: 16
Joined: Mon Mar 27, 2006 6:18 pm
Location: Augusta, GA USA

Re: Hello World!

Postby darkange on Thu Apr 13, 2006 2:58 am

hawking wrote:Hello World is the first programme one writes when learning a new language.
Below is a list of Hello World programmes:
I am sure this is helpful for comparing different programming languages.
~~~~~~~~~~
Ada
with Ada.Text_IO;

procedure Hello_World is
begin
Ada.Text_IO.Put_Line ("Hello World!");
end Hello_World;

[edit]
AppleScript
display dialog "Hello World!"

~~~~~~~~~~
ASP
response.write "Hello World!"

~~~~~~~~~~
Assembler (DOS)
.MODEL SMALL
.DATA
HWRLD DB "Hello world!$"
.CODE
MOV AX,@DATA
MOV DS,AX
MOV DX,OFFSET HWRLD
MOV AH,09H
INT 21H
POP DX
POP AX
MOV AH,4CH
INT 21H
END

~~~~~~~~~~
BASIC (ANSI) (Also works in FoxPro)
?"Hello World!"

~~~~~~~~~~
BCPL
GET "LIBHDR"
LET START() BE WRITES("Hello, World")

~~~~~~~~~~
C (ANSI)
#include <stdio.h>

int main() {
printf("Hello World!\n");
return 0;
}

~~~~~~~~~~
C#
using System;

namespace HelloWorld
{
public class HelloWorld {
static void Main() {
Console.WriteLine("Hello World!");
}
}
}

~~~~~~~~~~
C++
#include <iostream>

using namespace std;

int main()
{
cout << "Hello World!" << endl;
return 0;
}

~~~~~~~~~~
COBOL
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "Hello World!" LINE 15 POSITION 10.
100600 STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800 EXIT.

~~~~~~~~~~
DOS batch file
echo Hello World!




~~~~~~~~~~
D (DTrace)
#!/usr/sbin/dtrace -qs
BEGIN
{
trace("Hello World!");
exit(0);
}

~~~~~~~~~~
Fortran
WRITE (*,*) "Hello World!"

~~~~~~~~~~
Haskell
print "Hello World!"

~~~~~~~~~~
HTML
<html>
<head><title>Hello world</title></head>
<body>
Hello world
</body>
</html>

~~~~~~~~~~
Java
public class HelloWorld {
public static void main( String[] args ) {
System.out.println( "Hello World!" );
}
}

~~~~~~~~~~
Java Script
<script type="text/javascript">
window.alert("Hello World!");
</script>

~~~~~~~~~~
JSP
<%= "Hello World!" %>

~~~~~~~~~~
Lisp
(DEFUN HELLO-WORLD ()
(PRINT (LIST 'Hello 'World!)))

[edit]
Objective-C
#import <objc/objc.h>

int main (int arg, char **args) {
NSLog(@"Hello World!");

return 0;
}

~~~~~~~~~~
Parrot Assembler
print "Hello World!\n"
end

~~~~~~~~~~
Pascal
Begin
Writeln('Hello World!');
End.

~~~~~~~~~~
Perl
#!/usr/bin/perl
print "Hello World!\n";

[edit]
PHP
<?php
echo "Hello World!\n";
?>

~~~~~~~~~~
Python
#!/usr/bin/env python
print "Hello World!"

~~~~~~~~~~
QuickBASIC
PRINT "Hello World!"

~~~~~~~~~~
Ruby
#!/usr/bin/ruby
puts "Hello World!"

~~~~~~~~~~
Scheme
(display "Hello World")
(newline)

~~~~~~~~~~
Shell script (Bourne)
#!/bin/sh
echo 'Hello World!'

~~~~~~~~~~
Shell script (C)
#!/bin/csh
echo 'Hello World!'

~~~~~~~~~~
SPARK
with Spark_IO;
--# inherit Spark_IO;
--# main_program;

procedure Hello_World
--# global in out Spark_IO.Outputs;
--# derives Spark_IO.Outputs from Spark_IO.Outputs;
is
begin
Spark_IO.Put_Line (Spark_IO.Standard_Output, "Hello, world!", 0);
end Hello_World;

~~~~~~~~~~
Tcl
#!/usr/bin/tclsh
puts "Hello World!"

~~~~~~~~~~
TI BASIC
isp "Hello, World"

or

:ClrHome
isp "Hello, World"
Razzause
:ClrHome
:Output(1,1,"")

or even

:ClrHome
:Output(1,1,"Hello, World")
Razzause
:ClrHome
:Output(1,1,"")

~~~~~~~~~~
Tk
#!/usr/bin/wish
frame .top -borderwidth 10
pack .top -fill x
label .top.hi -text "Hello World!"
pack .top.hi -side left -padx 0p -pady 0

~~~~~~~~~~
Visual Basic
VBA.Interaction.MsgBox "Hello World!"

~~~~~~~~~~
Windows 32-bit Assembly
MASM:

.data
szHello db "Hello World",0
.code
push 0
push 0
push offset szHello
push offset szHello
push 0
call MessageBoxA
call ExitProcess
end
~~~~~~~~~~
darkange
Newbie
Newbie
 
Posts: 10
Joined: Thu Apr 13, 2006 2:49 am

Postby pumpas on Thu Apr 13, 2006 8:11 am

Really interesting to read O.o!
pumpas
Newbie
Newbie
 
Posts: 16
Joined: Thu Apr 13, 2006 7:08 am

Postby isralien on Thu Apr 27, 2006 1:47 pm

And here's a BIG miss :
(Hello world! written in Assembler-Z80-Console)
Code: Select all

DATAP: EQU #98 ; VDP Data port #98 works on all MSX models
; (TMS9918/TMS9929/V9938 or V9958)
; #80 works on SVI
; (for other platforms you have to figure this out by your self)

CMDP: EQU #99 ; VDP Command port #99 works on all MSX models
; (TMS9918/TMS9929/V9938 or V9958)
; #81 works on SVI
; (for other platforms you have to figure this out by your self)
;-----------------------------------------------------------------------
; Program starts here:

ORG 0 ; Z80 starts always from here when power is turned on
DI ; We don't know, how interrupts works in this system, so we disable them.

; Let's set VDP write address to #0000
XOR A
OUT (CMDP),A
LD A,#40
OUT (CMDP),A

; Now let's clear first 16Kb of VDP memory
LD B,0
LD HL,#3FFF
LD C,DATAP
CLEAR:
OUT (C),B
DEC HL
LD A,H
OR L
NOP ; Let's wait 8 clock cycles just in case VDP is not quick enough.
NOP
JR NZ,CLEAR

; Now it is time to set up VDP registers:
;----------------------------------------
; Register 0 to #0
;
; Set mode selection bit M3 (maybe also M4 & M5) to zero and
; disable external video & horizontal interrupt
LD C,CMDP
LD E,#80

OUT (C),A
OUT (C),E
;----------------------------------------
; Register 1 to #50
;
; Select 40 column mode, enable screen and disable vertical interrupt

LD A,#50
INC E
OUT (C),A
OUT (C),E
;----------------------------------------
; Register 2 to #0
;
; Set pattern name table to #0000

XOR A
INC E
OUT (C),A
OUT (C),E
;----------------------------------------
; Register 3 is ignored as 40 column mode does not need color table
;
INC E
;----------------------------------------
; Register 4 to #1
; Set pattern generator table to #800

INC A
INC E

OUT (C),A
OUT (C),E
;----------------------------------------
; Registers 5 (Sprite attribute) & 6 (Sprite pattern) are ignored
; as 40 column mode does not have sprites

INC E
INC E
;----------------------------------------
; Register 7 to #F0
; Set colors to white on black

LD A,#F0
INC E
OUT (C),A
OUT (C),E
;----------------------------------------

; Let's set VDP write address to #808 so, that we can write
; character set to memory
; (No need to write SPACE it is clear char already)
LD A,8
OUT (C),A
LD A,#48
OUT (C),A

; Let's copy character set
LD HL,CHARS
LD B, CHARS_END-CHARS
COPYCHARS:
LD A,(HL)
OUT (DATAP),A
INC HL
NOP ; Let's wait 8 clock cycles just in case VDP is not quick enough.
NOP
DJNZ COPYCHARS

; Let's set write address to start of name table
XOR A
OUT (C),A
LD A,#40
OUT (C),A

; Let's put characters to screen
LD HL,ORDER
LD B,ORDER_END-ORDER
COPYORDER:
LD A,(HL)
OUT (DATAP),A
INC HL

JR OVERNMI
NOP
NOP

; Here is address #66, that is entry for NMI
RETN ;Return from NMI

OVERNMI:
DJNZ COPYORDER

; The end
HALT

; Character set:
; --------------
ORDER:
DEFB 1,2,3,3,4,0,5,4,6,3,7
ORDER_END:

CHARS:

; H
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %11111000
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %00000000
; e
DEFB %00000000
DEFB %00000000
DEFB %01110000
DEFB %10001000
DEFB %11111000
DEFB %10000000
DEFB %01110000
DEFB %00000000
; l
DEFB %01100000
DEFB %00100000
DEFB %00100000
DEFB %00100000
DEFB %00100000
DEFB %00100000
DEFB %01110000
DEFB %00000000
; o
DEFB %00000000
DEFB %00000000
DEFB %01110000
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %01110000
DEFB %00000000
; W
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %10101000
DEFB %10101000
DEFB %11011000
DEFB %10001000
DEFB %00000000

; r
DEFB %00000000
DEFB %00000000
DEFB %10110000
DEFB %11001000
DEFB %10000000
DEFB %10000000
DEFB %10000000
DEFB %00000000
; d
DEFB %00001000
DEFB %00001000
DEFB %01101000
DEFB %10011000
DEFB %10001000
DEFB %10011000
DEFB %01101000
DEFB %00000000
chars_end:




Now don't say you've read it all Smile
isralien
Newbie
Newbie
 
Posts: 7
Joined: Thu Apr 27, 2006 1:05 pm
Location: Bulgaria

Postby xavice on Tue May 02, 2006 4:39 am

Lol, I did this in school on paper, didn't have nearly as much as you did.
xavice
Newbie
Newbie
 
Posts: 15
Joined: Tue May 02, 2006 4:35 am

PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron