Subscribe now and choose from over 30 free gifts worth up to £49 - Plus get £25 to spend in our shop
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!)
Hmm.. seemingly meaningless gibberish.. it's gotta be Perl.
Not bad, but easy to read compared to [url= http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29 ]Whitespace[/url]
GrahamS, you also appear to have too much time on your hands! (Very impressed by the way!)
You a programmer?!
[b]code[/b] is right - I think it means Jesus is my ancestor...
Alternatively he could have spent 0.5 seconds pasting it into google 🙂
It's "Hello World" apparently....
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...
What's the name of the language where instead of having a goto statement it has a comefrom statement?
You a programmer?!
Indeed I am and as Ian suggests, like any good coder worth his salt, I can use Google pretty well 😀
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?
If was hard to write it should be hard to read 🙂
GrahamS - MemberYou 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?
How about:
with Text_IO;
use Text_IO;
procedure HelloWorld is
begin
Put_Line("Hello World");
end HelloWorld;
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]
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]
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.
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!
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!)
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.
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...
C
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)
:
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)
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...
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
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...
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.
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...
Mmm, Java.
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..
Oracle, XML, SOAP, XHTML etc..
a programmer using [b]soap[/b] ?? Is that allowed ?
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...
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.
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
No-one guessed yet? And I could have chosen more obscure languages, pah, amateurs 😉
Looks like some kind of rule-based logic language, similar to Prolog?
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!!
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.
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.
epicsteve you sure you aren't thinking of lisp ?
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. 😕
epicsteve you sure you aren't thinking of lisp ?
Well it was a long time ago! Doesn't Prolog use lots of curly brackets?
[code]HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE[/code]
- [url= http://lolcode.com/examples/hai-world ]lolcode[/url]
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]
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)
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"
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!
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!
If you think ML is whacky you aint seen nothing...
*hunts down Hume hello world example*
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! 🙂
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!
Slightly modified to run without error in http://codepad.org/
*_="on8gi$kjg-(kojn$pkjntWnm&r*&uep!mPer{5vcnw0^~bnq";___(__){putchar
(_[__]-__);_[++__]!=!_?___(__):_;}main(){___(*_/(*_));return(!_);}
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. 😯
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 😉


