One for the program...
 

Subscribe now and choose from over 30 free gifts worth up to £49 - Plus get £25 to spend in our shop

[Closed] One for the programmers out there!

60 Posts
24 Users
0 Reactions
124 Views
Posts: 0
Free Member
Topic starter
 

I'm bored (can you tell?) so I thought I'd see if anyone recognises this bit of code:

('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"

r


Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>

(may not render quite right?)

and can name the programming language and what the language is named after! Oh, and what does it do?

SFB maybe?

It is apparently real (unless the source is a joke!)


 
Posted : 13/10/2009 3:17 pm
Posts: 31206
Full Member
 

Hmm.. seemingly meaningless gibberish.. it's gotta be Perl.


 
Posted : 13/10/2009 3:18 pm
Posts: 31206
Full Member
 

Oh, no it's [url= http://en.wikipedia.org/wiki/Malbolge ]Malbolge[/url]


 
Posted : 13/10/2009 3:20 pm
Posts: 8177
Free Member
 

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


 
Posted : 13/10/2009 3:20 pm
Posts: 31206
Full Member
 

Not bad, but easy to read compared to [url= http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29 ]Whitespace[/url]


 
Posted : 13/10/2009 3:22 pm
Posts: 0
Free Member
Topic starter
 

GrahamS, you also appear to have too much time on your hands! (Very impressed by the way!)

You a programmer?!


 
Posted : 13/10/2009 3:22 pm
Posts: 0
Free Member
 

[b]code[/b] is right - I think it means Jesus is my ancestor...


 
Posted : 13/10/2009 3:23 pm
Posts: 0
Free Member
 

Alternatively he could have spent 0.5 seconds pasting it into google 🙂


 
Posted : 13/10/2009 3:24 pm
Posts: 8177
Free Member
 

It's "Hello World" apparently....


 
Posted : 13/10/2009 3:25 pm
Posts: 0
Free Member
 

it doesn't appear to be about programming as such, more a matter of being insufferably obscure - not that workable program code is necessarily transparent...


 
Posted : 13/10/2009 3:26 pm
Posts: 0
Free Member
 

What's the name of the language where instead of having a goto statement it has a comefrom statement?


 
Posted : 13/10/2009 3:26 pm
Posts: 31206
Full Member
 

You a programmer?!

Indeed I am and as Ian suggests, like any good coder worth his salt, I can use Google pretty well 😀


 
Posted : 13/10/2009 3:27 pm
Posts: 0
Free Member
Topic starter
 

simonfbarnes - Member
it doesn't appear to be about programming as such, more a matter of being insufferably obscure - not that workable program code is necessarily transparent...

I thought that was your forte, SFB 😆 (I am joking, really!)

But shouldn't workable code be transparent by definition?


 
Posted : 13/10/2009 3:29 pm
Posts: 0
Free Member
 

If was hard to write it should be hard to read 🙂


 
Posted : 13/10/2009 3:31 pm
Posts: 0
Free Member
Topic starter
 

GrahamS - Member

You a programmer?!

Indeed I am and as Ian suggests, like any good coder worth his salt, I can use Google pretty well

But this wasn't meant to be a test of Google skills! 😀

What's your best shot at 'hello world' in an obscure language?


 
Posted : 13/10/2009 3:32 pm
Posts: 0
Free Member
Topic starter
 

How about:

with Text_IO;
use Text_IO;

procedure HelloWorld is
begin
Put_Line("Hello World");
end HelloWorld;


 
Posted : 13/10/2009 3:34 pm
Posts: 0
Free Member
 

That is Ada.

How about this
[code]
IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
AUTHOR. Fabritius.

ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.

DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.

PROCEDURE DIVISION.
DISPLAY "Hello World".
STOP RUN.
[/code]


 
Posted : 13/10/2009 3:40 pm
Posts: 6382
Free Member
 

But this wasn't meant to be a test of Google skills!

What's your best shot at 'hello world' in an obscure language?

google rules again, unfortunately

[url= http://www.roesler-ac.de/wolfram/hello.htm ]Fill yer boots here...[/url]


 
Posted : 13/10/2009 3:40 pm
Posts: 6382
Free Member
 

IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
AUTHOR. Fabritius.

ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.

DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.

PROCEDURE DIVISION.
DISPLAY "Hello World".
STOP RUN.

I'd have been too embarrassed to post that Khegs.


 
Posted : 13/10/2009 3:42 pm
Posts: 0
Free Member
Topic starter
 

Sorry, had to Google that myself!

So what are our favourite programming languages?

C# for me... just been doing some VB.Net and I know which I prefer!


 
Posted : 13/10/2009 3:53 pm
Posts: 1642
Free Member
 

I quite like vb.net, but in the asp.net world it doesn't seem that popular compared to c# so I'm going to retrain. Any book recommendations?
Also Linq to Sql, Css, Silverlight, Regular expressions etc? (got to finish asp.net unleashed first, only 1000 pages left to go!)


 
Posted : 13/10/2009 4:05 pm
Posts: 0
Free Member
 

Never had to use COBOL, fortunately, not being old 😉

It could have been worse though, it could have been this.
[code]
DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP
[/code]

Not sure about favourite programming languages, depends on the task, but for text manipulation, quick and dirty scripts to process data and personal web projects I'll tend to use Perl* (the swiss-army chainsaw of programming languages). I use a lot of php as well, mainly for work stuff, but I can spend ages criticising it. 😉

Python is good, especially for building small lightweight gui apps.

C# is ok, lots of handy libraries, though I'm as likely to pick C/C++ or java.

* Yes I know badly written Perl can be a nightmare to try and maintain, but that is other people's Perl code 😉

Easier to say what languages I would avoid at all costs, namely VB and Coldfusion, expecially coldfusion, it is a horrible nasty language and I hope it dies soon.


 
Posted : 13/10/2009 4:07 pm
Posts: 0
Free Member
 

I thought that was your forte, SFB (I am joking, really!)

that thought did cross my mind, though I try to get people to think rather than just confusing them 🙂

But shouldn't workable code be transparent by definition?

in theory perhaps, but not often in practice...


 
Posted : 13/10/2009 4:08 pm
Posts: 0
Free Member
 

C


 
Posted : 13/10/2009 4:13 pm
Posts: 0
Free Member
 

PROC do.stuff (CHAN OF SP fs, ts)
SEQ
so.write.string.nl(fs, ts, "Hello World!")
SEQ i = 1 FOR 10
SEQ
so.write.int(fs, ts, i, 0)
so.write.nl(fs, ts)
:


 
Posted : 13/10/2009 4:14 pm
Posts: 31206
Full Member
 

So what are our favourite programming languages?

I mainly write in C at the moment - we do a lot of work on embedded devices. I'm currently coding up a consumer medical device on a microprocessor with 4KB RAM and 120KB Flash. And that's a lot for us 😯

Having said that I also write C#, Java and C++. Plus all the supporting toy languages (Python, PHP, VB, SQL, HTML/CSS etc)


 
Posted : 13/10/2009 4:19 pm
Posts: 0
Free Member
 

on a microprocessor with 4KB RAM

bloody luxury lad! I used to program an 8051 with just 128 bytes of RAM :o) My current machine has 46,000,000 times as much...


 
Posted : 13/10/2009 4:26 pm
Posts: 0
Free Member
Topic starter
 

plop_pants - Member
I quite like vb.net, but in the asp.net world it doesn't seem that popular compared to c# so I'm going to retrain. Any book recommendations?
Also Linq to Sql, Css, Silverlight, Regular expressions etc? (got to finish asp.net unleashed first, only 1000 pages left to go!)

C# / VB.Net seems to be split about 60 / 40, so worth doing some of both (I stand to be corrected here) but my recommendations are:

[url= http://www.wrox.com/WileyCDA/WroxTitle/Beginning-ASP-NET-3-5-In-C-and-VB.productCd-047018759X.html ]Beginning ASP.Net In C# (and VB.Net)[/url]

[url= http://www.wrox.com/WileyCDA/WroxTitle/Professional-ASP-NET-3-5-In-C-and-VB.productCd-0470187573.html ]Professional ASP.Net (both languages)[/url] (covers linq and a bit of Silverlight)

Anything by Wrox is worth a look (I have a stack of their books!)

and

[url= http://apress.com/ ]Apress[/url] seem pretty good


 
Posted : 13/10/2009 4:30 pm
 IA
Posts: 563
Free Member
 

I see your slightly obscure or archaic mainstream languages, and raise you slightly obscure research languages:

!hello.

+!hello : true
<- .println("hello world").

Cookie for the first one to get it...


 
Posted : 13/10/2009 4:59 pm
Posts: 1642
Free Member
 

thanks Julian.
As I'm working towards getting a job in this area is there a core set of
skills that you think would provide an entry into the market? Or am I going to have to spend the next 6 months reading everything just to get a look-in? Being unemployed at the mo I need to get the balance right.


 
Posted : 13/10/2009 5:03 pm
Posts: 0
Free Member
Topic starter
 

@IA

Any clues?


 
Posted : 13/10/2009 5:05 pm
 IA
Posts: 563
Free Member
 

Hmm, how big a clue that's the question. I'll start with not so helpful one, as if it was easy, the game would be no fun 😉

"!hello" is setting a goal to be achieved...

Of course, by "slightly obscure" it's possibly "very obscure" to folk not in my area of research. So this is likely to be more a test of google skills...


 
Posted : 13/10/2009 5:07 pm
Posts: 0
Free Member
Topic starter
 

@plop_pants

IM or email me: vdub1992[at]hotmail.co.uk

Happy to chat away from here!


 
Posted : 13/10/2009 5:15 pm
Posts: 91096
Free Member
 

Mmm, Java.


 
Posted : 13/10/2009 5:25 pm
Posts: 0
Free Member
 

I'm a toy programmer me! PHP 5 mainly. Have recently written a PAM module in C though and might dust off my Java skills just to keep current but really I'm very happy in PHP world.

toolset: php, apache, RHEL, textpad, vim, svn, phpdoc, phing, Zend Framework, MySQL, Oracle, XML, SOAP, XHTML etc..


 
Posted : 13/10/2009 5:43 pm
Posts: 0
Free Member
 

Oracle, XML, SOAP, XHTML etc..

a programmer using [b]soap[/b] ?? Is that allowed ?


 
Posted : 13/10/2009 5:51 pm
Posts: 0
Free Member
Topic starter
 

a programmer using soap ?? Is that allowed ?

This would be Open Source programmers washing their feet after they've been wearing socks with their sandals.

And yes, I do have three Marins AND a beard (sort of), before you ask...


 
Posted : 13/10/2009 9:35 pm
Posts: 460
Free Member
 

I left my first job writing assembler when i wrote a cheque in hexadecimal. Honestly, it was about then i decided i maybe needed a holiday.


 
Posted : 13/10/2009 10:00 pm
Posts: 0
Free Member
 

C is still cool and not bettered for micro-processors IMO.
C++ is ... interesting, and requires extreme paranoia to avoid difficult bugs
Java is very good now, if a tad verbose. And I dig Eclipse.
Perl is a personal fav. A Swiss army knife.
Ada good, if verbose
Python is nice to structure and read
VisualBasic - (feel sick)

Haven't tried any others


 
Posted : 13/10/2009 11:00 pm
 IA
Posts: 563
Free Member
 

No-one guessed yet? And I could have chosen more obscure languages, pah, amateurs 😉


 
Posted : 14/10/2009 9:55 am
Posts: 31206
Full Member
 

Looks like some kind of rule-based logic language, similar to Prolog?


 
Posted : 14/10/2009 10:15 am
Posts: 0
Full Member
 

NZCol, That made me chuckle.

Up till 12 months ago I programmed assembler full time for the best part of a decade.

I actually remember dreaming in Z80!!


 
Posted : 14/10/2009 10:43 am
Posts: 0
Free Member
 

Never had to use COBOL, fortunately, not being old

Only had to use it once since uni, and that was Pro*Cobol (i.e. linked to an Oracle database). I was on site as an Oracle consultant and got asked if I could help on another project where the original programmer wasn't around any longer. Horrible language to work in.

At uni I was taught a lot of programming languages and of them I liked Pascal and Modula-2 - both of which are virtually unused in the real world. I've spend most of my career doing PL/SQL & SQL plus 4GL's and a bit of Java.


 
Posted : 14/10/2009 10:48 am
Posts: 0
Free Member
 

Looks like some kind of rule-based logic language, similar to Prolog?

I did Prolog at uni - not the nicest to work in 'cause of all the brackets if I recall correctly.


 
Posted : 14/10/2009 10:48 am
Posts: 0
Free Member
 

epicsteve you sure you aren't thinking of lisp ?


 
Posted : 14/10/2009 12:56 pm
Posts: 31206
Full Member
 

Yep. LISP is [u]L[/u]ots of [u]I[/u]rritating and [u]S[/u]illy [u]P[/u]arentheses.

Prolog is the one where you give it some rules and then ask it questions, which seems a little similar to what IA was doing in his code:

[code]!hello.
+!hello : true
<- .println("hello world").[/code]

which I'm guessing either means something like
"the goal is hello. To make the goal true then println hello word"
or it means
"hello is false. Create a rule that if hello is false, make it true by printlning hello world."

Awaits with baited breath to find out. 😕


 
Posted : 14/10/2009 1:11 pm
Posts: 0
Free Member
 

epicsteve you sure you aren't thinking of lisp ?

Well it was a long time ago! Doesn't Prolog use lots of curly brackets?


 
Posted : 14/10/2009 1:49 pm
Posts: 11937
Free Member
 

[code]HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE[/code]

- [url= http://lolcode.com/examples/hai-world ]lolcode[/url]


 
Posted : 14/10/2009 2:29 pm
Posts: 31206
Full Member
 

Some Prolog:

[code]/* The Facts */
father( john, jim ).
mother( jane, jim ).
father( jack, john ).
[/code]
[code]/* The Rules */
parent( Person1, Person2 ) :- father( Person1, Person2 ).
parent( Person1, Person2 ) :- mother( Person1, Person2 ).
grandparent( Person1, Person2 ) :-
parent( Person3, Person2 ),
parent( Person1, Person3 ).
[/code]
[code]/* Some queries */
?- father( Who, jim ).
Who = john
?- mother( jane, fred ).
No.
?- mother( jane, jim ).
Yes.
?- grandparent( jack, ).
jim
[/code]


 
Posted : 14/10/2009 2:32 pm
 IA
Posts: 563
Free Member
 

Prolog is close-ish, (one of the) interpreters for the language uses prolog in the implementation.

The language is AgentSpeak(L) (technically AgentSpeak(XL) actually).

!hello is a goal, and then goals are selected according to the agent's beliefs and desires. In this case, there's only one plan, and the guard on it is simply true.

The above code would work with Jason (jason.sf.net)


 
Posted : 16/10/2009 9:25 am
Posts: 31206
Full Member
 

Prolog is close-ish

Good enough for me. I declare myself King of Geeks.

[img] [/img]


 
Posted : 16/10/2009 10:00 am
Posts: 3292
Full Member
 

I like C# but I have to admit I'm going off it with all the new features that keep going in. Whatever happened to K.I.S.S.

A long time ago I coded Tcl/Tk and now I'm getting to like Ruby which seems like the offspring of a perl/tcl/smalltalk orgy. Nice simple hello worlds in those types of thing:

puts "hello world"


 
Posted : 16/10/2009 10:28 am
Posts: 0
Free Member
 

I wrote a compiler once in a mixture of prolog, and ml (wacky functional language) that compiled to a pseudo machine that was emulated in ml also.

I think I might have a claim to the king of the nerds crown too!

Why? I needed to learn the basics of compiler stuff for my compilers course, prolog for the ai course, and some functional programming rubbish - just thought i could more efficently learn all that stuff in one go. Oh and it was useful for another course (architectures or something) to write emulators - I did an Arm one too when we had to do firmware hacking and I couldn't be bothered to go to the lab where the chips were.

Joe
You'd never know I'm a nerd for a living still!


 
Posted : 16/10/2009 10:39 am
Posts: 31206
Full Member
 

joemarshall pictured yesterday in his lair:

[img] [/img]

😉


 
Posted : 16/10/2009 10:45 am
Posts: 7
Free Member
 

Now [url= http://en.wikipedia.org/wiki/Brain**** ]this[/url] is what I call a difficult language. Hope the swear filter doesn't corrupt the URL!


 
Posted : 16/10/2009 1:08 pm
 IA
Posts: 563
Free Member
 

If you think ML is whacky you aint seen nothing...

*hunts down Hume hello world example*


 
Posted : 16/10/2009 1:59 pm
 Davy
Posts: 0
Free Member
 

I used to work on AS/400s, many moons ago. RPG was quite possibly one of the worst languages ever invented. Designed to be written on punch cards originally, when they swapped it to a screen based version they kept all the punchcard layout, so everything had to be in exactly the right place.

All you could do with it was crunch numbers and move data around. No graphics other than plain text on a green/black screen. Can't believe I spent 6 years doing that crap. Tis no wonder I had a nervous breakdown! 🙂


 
Posted : 16/10/2009 2:36 pm
Posts: 0
Free Member
 

Far more interesting than using an obscure language is writing obscure code in a mainstream language http://www.ioccc.org/

*_="on8gi$kjg-(kojn$pkjntWnm&r*&~ep!wPer{5vcvw0^obnq";__(___){putchar
(_[___]-___);_[++___]!=___-___?__(___):___;}main(){__(1);}

Wouldn't win any prizes, but I didn't want to make it too hard!


 
Posted : 16/10/2009 3:11 pm
Posts: 0
Free Member
 

Slightly modified to run without error in http://codepad.org/

*_="on8gi$kjg-(kojn$pkjntWnm&r*&uep!mPer{5vcnw0^~bnq";___(__){putchar
(_[__]-__);_[++__]!=!_?___(__):_;}main(){___(*_/(*_));return(!_);}


 
Posted : 16/10/2009 3:37 pm
Posts: 106
Free Member
 

Or for a clean compile with gcc -std=c99 -pedantic -Wall :-

#include <stdio.h>

int *string = (int *)"on8gi$kjg-(kojn$pkjntWnm&r*&~ep!wPer{5vcvw0^obnq";

void hello(int idx)
{
putchar(string[idx] - idx);
if (string[++idx] != 0) hello(idx);
}

int main(void)
{
hello(1);
return 0;
}

Nice bit of dodgy pointer conversion from char * to int * in there 🙂

[EDIT]

Actually I'm surprised the obfuscated version didn't take the chance to use one of C's strangest features:-

value = array[index];

...can legally be replaced with...

value = index[array];

...yielding exactly the same result. 😯


 
Posted : 16/10/2009 3:43 pm
Posts: 0
Free Member
 

Dodgy pointer conversion kind of forced on me by the desire to use as few keywords as possible - though it has the nice side effect of helping to hide the data. I'm actually quite proud of that bit of code (bear in mind I hand coded it just now, hence why I might not have used all possible obfuscation techniques)!

BTW you should try the second version - output is slightly different 😉


 
Posted : 16/10/2009 3:59 pm