Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Coding fun - poems, love letters and source art
New Posts  All Forums:Forum Nav:

Coding fun - poems, love letters and source art

post #1 of 11
Thread Starter 
(inspired from a tangent on another thread)
Quote:
Originally Posted by SectorNine50 View Post

Python is a cool language because it's syntax is so close to English, at least compared to other languages.

Quote:
Originally Posted by crust_cheese View Post

But not compared to this language.

I've just stumbled across this gem:
Quote:
I wanted to creatively express my affection for my daughter, Augusta, in a way I know best. I chose Ruby for its flexibility and elegance. My hope is to introduce her to its boundless beauty someday soon using this composition.

tumblr_inline_mg9ptrCXQh1rdwud0.png

This is a real, working, program which outputs “Augusta, we <3 you!” when executed.
http://jpfuentes2.tumblr.com/post/39935683274/a-letter-to-my-daughter-augusta-in-ruby
post #2 of 11
Wow.
post #3 of 11
Wow! And to think that the most poetic I can get with programming languages is:
Code:
print("Hello, World!")

tongue.gif
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
post #4 of 11
Quote:
Originally Posted by {Unregistered} View Post

Wow! And to think that the most poetic I can get with programming languages is:
Code:
print("Hello, World!")
tongue.gif
I can go one worse
Code:
Console.writeline("Hello world!")
Console.readline

Pros use console.readline to stop the cmd window closing... right? redface.gif
Fate/Zero
(19 items)
 
Storage Server
(9 items)
 
 
MotherboardRAMHard DriveHard Drive
Gigabyte N3150-D3V 8GB Crucial Non-ECC (Live life on the edge) Western Digital 4TB Western Digital 4TB 
Hard DriveHard DriveOSPower
Western Digital 4TB Western Digital 4TB FreeNAS Corsair 350W 
Case
3U Logic Case SC-2306B-550B 
  hide details  
Reply
Fate/Zero
(19 items)
 
Storage Server
(9 items)
 
 
MotherboardRAMHard DriveHard Drive
Gigabyte N3150-D3V 8GB Crucial Non-ECC (Live life on the edge) Western Digital 4TB Western Digital 4TB 
Hard DriveHard DriveOSPower
Western Digital 4TB Western Digital 4TB FreeNAS Corsair 350W 
Case
3U Logic Case SC-2306B-550B 
  hide details  
Reply
post #5 of 11
Here's what you might call a bit of programming art using the IMP operator where [ryt] IMP [lft] produces a logical result which is FALSE IFF [lft] is TRUE and [ryt] is FALSE, as in the table:
Code:
   IMP|0|1 Right
   ---+-+-
Left 0|1|1
   ---+-+-
     1|0|1

This can give the following loop:
Code:
GoBackToSleep:
        TheAlarmHasGoneOff:=(Alarm<=Time);
        ItIsSunday:=(Today=Sunday);
        if      TheAlarmHasGoneOff
        IMP     ItIsSunday
        then    GoBackToSleep
        else    GetUpOrYouWillBeLate;

Edited by Himo5 - 1/13/13 at 8:08pm
post #6 of 11
Thread Starter 
Quote:
Originally Posted by Himo5 View Post

Here's what you might call a bit of programming art using the IMP operator where [ryt] IMP [lft] produces a logical result which is FALSE IFF [lft] is TRUE and [ryt] is FALSE, as in the table:
Code:
   IMP|0|1 Right
   ---+-+-
Left 0|1|1
   ---+-+-
     1|0|1

This can give the following loop:
Code:
GoBackToSleep:
        TheAlarmHasGoneOff:=(Alarm<=Time);
        ItIsSunday:=(Today=Sunday);
        if      TheAlarmHasGoneOff
        IMP     ItIsSunday
        then    GoBackToSleep
        else    GetUpOrYouWillBeLate;
Nice.

I struggled with that this morning (getting out of bed, that is. Never used IMP laugher.gif)
post #7 of 11
the.question = to.be || !to.be


tongue.gif
    
CPUMotherboardGraphicsRAM
FX-8120, and a bunch more AM3/AM2+ Crosshair V, Crosshair IV Lots of green Dominator GT 
RAMRAMHard DriveCooling
Dominator GT Perfect Storm M4 64Gb Dihydrogen monoxide, Carbon dioxide, Liquid Nit... 
CoolingCoolingOSPower
OCN Marksman pot k|ngp|n F1 Dark pot Stripped Xp Antec 1200W HCP 
Case
Dimastech Hard 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX-8120, and a bunch more AM3/AM2+ Crosshair V, Crosshair IV Lots of green Dominator GT 
RAMRAMHard DriveCooling
Dominator GT Perfect Storm M4 64Gb Dihydrogen monoxide, Carbon dioxide, Liquid Nit... 
CoolingCoolingOSPower
OCN Marksman pot k|ngp|n F1 Dark pot Stripped Xp Antec 1200W HCP 
Case
Dimastech Hard 
  hide details  
Reply
post #8 of 11
Quote:
Originally Posted by Plan9 View Post

Nice.

I struggled with that this morning (getting out of bed, that is. Never used IMP laugher.gif)

Very sorry for making you struggle because of my preamble, which should have said:

...using the IMP operator where [lft] IMP [ryt]
post #9 of 11
Thread Starter 
Quote:
Originally Posted by Himo5 View Post

Very sorry for making you struggle because of my preamble, which should have said:

...using the IMP operator where [lft] IMP [ryt]

It wasn't your code I struggled with, it was getting out of bed this morning (which your code was joking about) laugher.gif
post #10 of 11
Quote:
Originally Posted by just_nuke_em View Post

the.question = to.be || !to.be


tongue.gif
ALWAYS true.

Therefore the.question is probably constant-folded to true.

http://macournoyer.com/blog/2010/02/23/how-to-apply-to-a-job/
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Coding fun - poems, love letters and source art