الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

تاريخ Hello World مع لغات برمجية بشعة .

بدأه Abdullah.Alshammeri في 12 سبتمبر 2010 · 12 رد · 5,248 مشاهدة · في المقالات العلمية و التقنية
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ،

كمقدمة كلاسيكية : Hello World هو أول برنامج وأبسط برنامج ستكتبه باستخدام لغة برمجية ما ، وكثير من مطوّري لغات البرمجة أو المكتبات التي تعتمد على لغات برمجية ، يحاولون استعراض عضلاتهم بمدى سهولة وتنظيم " التطبيق الأول " ، باعتبار أن كل من سيقرأ Hello World سيستمر في رحلة التعلّم أو أن يصاب بصدمة نفسية تقضي على المسيرة مبكراً ( إن كان له الخيرة من أمره ) .

الـ Wikiيقول ، إن كتاب Programming in C: A Tutorial ، هو من أوائل من احتوى على هذه الجملة لكتابة تطبيق يطبع Hello Word :

 #include <stdio.h>
 int main() 
 {
        printf("hello, world");
        return 0;
 }

أمّا النطبيق الأول على الاطلاق فقد يكون حدث في عام 1972 في Kernighan's Tutorial Introduction to the Language B :

main( ) {
  extrn a, b, c;
  putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';

يمكنك من خلال موقع http://hellowiki.org ، الاطلاع بشكل سريع على الـ Hello World للغات برمجية كثيرة .

Hello World للغات غريبة

لغة Brain***

( لا تستغرب جمال الاسم ، فستعرف لماذا الآن ) ، و Hello World الخاص بها والذي يطبع جملة Hello World على الشاشة :

+++++ +++++             initialize counter (cell #0) to 10
[                       use loop to set the next four cells to 70/100/30/10
    > +++++ ++              add  7 to cell #1
    > +++++ +++++           add 10 to cell #2 
    > +++                   add  3 to cell #3
    > +                     add  1 to cell #4
    <<<< -                  decrement counter (cell #0)
]                   
> ++ .                  print 'H'
> + .                   print 'e'
+++++ ++ .              print 'l'
.                       print 'l'
+++ .                   print 'o'
> ++ .                  print ' '
<< +++++ +++++ +++++ .  print 'W'
> .                     print 'o'
+++ .                   print 'r'
----- - .               print 'l'
----- --- .             print 'd'
> + .                   print '!'
> .                     print '\n'

فعلاً ، اسم على مسمّى :/ .

لغة Whitespace

طبعاً كسابقتها ، فالاسم على مسمّى ، ولتطبق جملة Hello World ، ستحتاج إلى أن تستخدم إبهامك مئات المرّات لتصل إلى Space بسرعة :

| | | |
| | | |	| | |	| | | |
|	|	| | | | |	|
| | | |	|	| | |	| |	|
|	|	| | | | |	| |
| | | |	|	| |	|	| | |
|	|	| | | | |	|	|
| | | |	|	| |	|	| | |
|	|	| | | | |	| | |
| | | |	|	| |	|	|	|	|
|	|	| | | | |	| |	|
| | | |	| |	|	| | |
|	|	| | | | |	|	| |
| | | |	| | | | | |
|	|	| | | | |	|	|	|
| | | |	|	|	| |	|	|	|
|	|	| | |
| | |	| | | |
| | | |	|	| |	|	|	|	|
|	|	| | | | |	| | |	|
| | | |	|	|	| | |	| |
|	|	| | | | |	| |	| |
| | | |	|	| |	|	| | |
|	|	| | | | |	| |	|	|
| | | |	|	| | |
|	| | |
|	|	| | | | |	|	| | |
| | | |	| | | | |	|
|	|	| | | | |	|	| |	|
| | | |	|	| |	|
|	|	| | | | |	|	|	| |
| | | |	| |	| |
|	|	| | | | |	|	|	|	|
| | | | |
|	|
|	| | | | | |
empty-line
| | | | |	|
empty-line
| |	|	|	| |
empty-line
|	| | |	| |
|	|
| | | | | |	|
|	| | | |
empty-line
| | |	|
empty-line
| | | |	| |
empty-line
empty-line/EOF

لغة LOLCODE

غرابة اللغة بأسلوبها ، وليس بتعقيدها هذه المرة ، وهذا Hello World مناسب :

 HAI
 CAN HAS STDIO?
 PLZ OPEN FILE "LOLCATS.TXT"?
     AWSUM THX
         VISIBLE FILE
     O NOES
         INVISIBLE "ERROR!"
 KTHXBYE

التفسير البشري لبعض الجمل سيكون : Please try to open a file ، و Okay thanks, bye !

لغة Ladder Logic

لا أعرف Hello World لها ، ولكن أعرف أنها بشعة بما يكفي :

| X001 Y001                                             Y001 |
|-| |---|/|---[01000 TON T002]-[01000 TOF T003]---------( )--|
|                                                            |
|  X001                                                 Y002 |
|--| |----+---------------------------------------------( )--|
|         |                                                  |
|  Y002   |                                                  |
|--| |----+                                                  |
|                                                            |
|  X001 R006                                                 |
|--| |--|/|--[01000 TON T004]-----+-------[D150 + 1 -> D150]-|
|                                 |                     R006 |
|                                 +---[01000 TOF T005]--( )--| 
|                                                            |
|                                                       Y003 |
|-[D150 >200]-------------------------------------------( )--|
|                                                            |
| Y003                                                       |
|-| |-----------------------------------------[ 0 MOV D150]--|
|                                                            |
|--{END}-----------------------------------------------------|

أخيراً :

خطر ببالي الموضوع بينما كنت أقرأ أحد مواضيع programmers.stackexchange.com ، الموقع يبدو رائع :wub: .

كثير من اللغات السابقة تتبع تصنيفEsoteric programming languages ،

19

logo1.png تطبيق طمأنينة ، نسخة بيتا على أندرويد

عبدالله الشمّري - Al-Shammari

CodingAlone.com

twitter @abshammeri

abshammeri AT gmail.com

github : abshammeri

#2

:ph34r:

يبدو أن القوم كانو يتنافسون على جائزة أغرب لغة برمجة :lol: , هذه ال whitespace كارثة قومية .

1

banner_60_468.gif

NOTHING IS IMPOSSIBLE

#3

هذه هي اللغات السهلة حقاً ! اعتقد في البداية (قبل قراءة الموضوع) أن الأمثلة ستكون طويلة لكن ذات معنى ; و ليس بهذا الشكل !

لم أضحك على أي اللغات المذكورة بقدر ما ضحكت على الـLOLCODE هذه ، لكني أعتقد بأن المثال المكتوب بواسطتها لا يطبع Hello World ، أليس كذلك ؟؟

هل لغة Whitespace هذه حقيقية ، لا أعتقد بأن منشئها حتى يستطيع اسعمالها !

شكراً لك على موضوعك ذا النوع الجديد !

ما رأيك في لغة Chef :

هذا مثال Hello World من ويكيبيديا :

 Hello World Souffle.

 Ingredients.
 72 g haricot beans
 101 eggs
 108 g lard
 111 cups oil
 32 zucchinis
 119 ml water
 114 g red salmon
 100 g dijon mustard
 33 potatoes

 Method.
 Put potatoes into the mixing bowl.
 Put dijon mustard into the mixing bowl.
 Put lard into the mixing bowl.
 Put red salmon into the mixing bowl.
 Put oil into the mixing bowl.
 Put water into the mixing bowl.
 Put zucchinis into the mixing bowl.
 Put oil into the mixing bowl.
 Put lard into the mixing bowl.
 Put lard into the mixing bowl.
 Put eggs into the mixing bowl.
 Put haricot beans into the mixing bowl.
 Liquefy contents of the mixing bowl.
 Pour contents of the mixing bowl into the baking dish.

 Serves 1.

حسب Wikipedia هذه اللغات تعتبر لغات سبب إنشائها هو المزاح أو أي سبب غير البرمجة الطبيعية :

http://en.wikipedia.org/wiki/Esoteric_programming_language

4
#4
اقتباس
يبدو أن القوم كانو يتنافسون على جائزة أغرب لغة برمجة

خطر ببالي أنهم درسوا مادة Compiler في الجامعة وهذا كان احد تطبيقات طالب أو باحث " فاضي شغل " :D .

اقتباس
لكني أعتقد بأن المثال المكتوب بواسطتها لا يطبع Hello World ، أليس كذلك ؟؟

هو يقرأ ملف نصي .. ويكفي أن تتخيّل أن هذا الملف يحوي كلمة Hello World :D ( يوجد مثال أبسط ، لكن فضّلت هذا ، لاحتوائه على جمل أكثر : ) ) .

أما لغة Chef فهي موضوع لوحده :D .

1

logo1.png تطبيق طمأنينة ، نسخة بيتا على أندرويد

عبدالله الشمّري - Al-Shammari

CodingAlone.com

twitter @abshammeri

abshammeri AT gmail.com

github : abshammeri

#5
sitesmaker كتب:

ما رأيك في لغة Chef :

هذا مثال Hello World من ويكيبيديا :

 Hello World Souffle.

 Ingredients.
 72 g haricot beans
 101 eggs
 108 g lard
 111 cups oil
 32 zucchinis
 119 ml water
 114 g red salmon
 100 g dijon mustard
 33 potatoes

 Method.
 Put potatoes into the mixing bowl.
 Put dijon mustard into the mixing bowl.
 Put lard into the mixing bowl.
 Put red salmon into the mixing bowl.
 Put oil into the mixing bowl.
 Put water into the mixing bowl.
 Put zucchinis into the mixing bowl.
 Put oil into the mixing bowl.
 Put lard into the mixing bowl.
 Put lard into the mixing bowl.
 Put eggs into the mixing bowl.
 Put haricot beans into the mixing bowl.
 Liquefy contents of the mixing bowl.
 Pour contents of the mixing bowl into the baking dish.

 Serves 1.

blink.gifblink.gifblink.gif الرجال نسي الحليب!! ph34r.gif

lxcs.png

syria-flag_small.jpg

#6

هل كل هذه اللغات موجوده الى الان ؟! اقصد تحد الاستخدام؟!

بعضها لم اسمع عنه في حياتي

#7

هذه لغات ليست للاستخدام العام. أصحابها قاموا يتطويرها كنكتة، وفب الغالب كـ"تدريب" على تصميم اللغات. :)

LOLCode مبنية على اللغة الإنجليزية المكسرة التي تستخدمها قطط LOLCats المشهورة

a5ea245e-65a7-4e4e-9f6d-b23406ae7b4b.jpg

#8

سمعت عن لغة Ladder Logic

وأعتقد أني أعرف من يستخدمها سأسأل عنها غداً وأوافيكم بآخر الأحداث :)

تحياتي

حزمة المحرك الإصدارة 0.8

أي أحد يجد أني ظلمته فليراسلني

وبإذن الله لو كان له حق سيأخذه

728x90.png

#9

وصلت متأخراً tongue.gif

سابقاً عندما قرأت مثال الـ Brain*** للمرة الأولى ظننت أن الكود المفهوم المكتوب في المثال هو من ضمن الكود أي سيتم تفسيره أيضاً ولكن تفاجئت فيما بعد عندما عرفت أنها Comments وأن هذه اللغة لا تفسر إلا 8 محارف فقط هي هذه الرموز +-<>[],.

وهناك أيضاً لغة Taxi و لغة Shakespeare وغيرهم

أمثلة من الـ Wikipedia :

- مثال ضرب عددين يتم ادخالهم من قبل المستخدم بواسطة لغة Taxi :

  Go to the Post Office: west 1st left, 1st right, 1st left.
   Pick up a passenger going to Multiplication Station.
   Pick up another passenger going to Multiplication Station.
   Go to Multiplication Station: south 1st left, 3rd left.
   Pick up a passenger going to the Post Office.
   Go to the Post Office: south 1st left, 3rd right.
   Go to the Taxi Garage: north 1st right, 1st left, 1st right.

- وهذا مثال مكتوب بلغة Shakespeare

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.

   				Act I: Hamlet's insults and flattery.
   				Scene I: The insulting of Romeo.
[Enter Hamlet and Romeo]
Hamlet:
You lying stupid fatherless big smelly half-witted coward! You are as
stupid as the difference between a handsome rich brave hero and thyself!
Speak your mind!
You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!
You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.
Speak your mind!
[Exit Romeo]
   				Scene II: The praising of Juliet.
[Enter Juliet]
Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!
[Exit Juliet]
   				Scene III: The praising of Ophelia.
[Enter Ophelia]
Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!
Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!
[Exeunt Ophelia and Hamlet]

   				Act II: Behind Hamlet's back.
   				Scene I: Romeo and Juliet's conversation.
[Enter Romeo and Juliet]
Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!
Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!
[Exit Romeo]
   				Scene II: Juliet and Ophelia's conversation.
[Enter Ophelia]
Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!
Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!
[Exeunt]

فعلاً إنها لغات غريبة! :)

اقتباس

سمعت عن لغة Ladder Logic

هذه اللغة بحسب معلوماتي تستخدم في برمجة الـ PLCs ولها شهرة لا بأس بها في هذا المجال

والمكتوب في المثال الموجود في الأعلى فيه تمثيل لبوابات AND و OR و أمور أخرى والله أعلم

تم تعديل هذه المشاركة بواسطة MoHaMMaD Pro في 27 أكتوبر 2010 في 01:15

2

Everything will be fine when we TALK LESS, DO MORE


#10

ده لغة برمجة من انتاج محمد فوزى ﻻطفال الستينيات من القرن الماضى وكانت بتستخدم مع العتاد خاصة كروت الصوت الملحقة بأجسام الاطفال حتى تقوم بإغﻻقها وقت اللزوم وذلك

لمنع الـ overflow فى ذاكرة الاباء والناتج من ضوضاء الصوت عند بكاء وصراخ الاطفال مما ينتج عنه runtime error فى الحالة المزاجية للآباء واحيانا تحتاج لـ free allocation memory process

ذهب الليل --
طلع الفجر ++
والعصفور ** صو صو

شاف القطة
قالها بسبس
قالت له نو نو

:lol:

هو لو الغرب هيسوق علينا الجنان احنا اجن منهم

تم تعديل هذه المشاركة بواسطة Ah.K.EL-Saman في 28 أكتوبر 2010 في 14:49

6 −1

سَبِّحِ اسْمَ رَبِّكَ الْأَعْلَى

#11
اقتباس
ده لغة برمجة من انتاج محمد فوزى ﻻطفال الستينيات من القرن الماضى

من اللغات التى يدمنها ال Junior Kids بسهولة و تستطيع حل كثير من المشاكل فى ال Home

1

Technical Lead Developer

My LinkedIn Profile

اللهم قنى شر الجهل و الجهلاء

( اقْتَرَبَ لِلنَّاسِ حِسَابُهُمْ وَهُمْ فِي غَفْلَةٍ مَّعْرِضُونَ ) {الأنبياء:1}

#12

نقاش ومعلومات مهمت لكن في نصري الخاص ليس هدا هو أفصل متال

#13

لغـات غريبة فعلا ...شكرا على الافادة :)

مواضيع مشابهة