12
\$\begingroup\$

A JAPH is a grand tradition of making a program that prints "Just another Perl hacker,". We already have a question about JAPH on this site but they seem more concerned with hiding the text, but JAPH has always been more about hiding the method by which it does what it does. Therefore I challenge you to show off your favorite language's cool features, and don't worry too much about hiding the text (unless you want to).

Here's mine, in Perl, which shouldn't be to hard for an experienced velociraptor to understand, but may be interesting for others.

(*STORE,*TIESCALAR)=map{eval"sub{$_}"}qw'map{print&&sleep$|}split//,pop bless\$|++';tie$t,main;$t="Just another Perl hacker,\n"

Judged subjectively on votes by you guys, lets see some mind-benders!

\$\endgroup\$
3
  • \$\begingroup\$ Maybe you should update the Wikipedia article on JAPH, because most of its examples seem to be about hiding the text. \$\endgroup\$ Commented Oct 2, 2011 at 12:27
  • \$\begingroup\$ @PeterTaylor, Ok there are plenty that DO try to hide the text, and those are not wrong, but I wanted one that did explore the method. See for example many of those posted in cpan.org/misc/japh \$\endgroup\$ Commented Oct 5, 2011 at 14:10
  • 1
    \$\begingroup\$ "shouldn't be to hard for an experienced velociraptor to understand, but may be interesting for others" that's true of any Perl program, I don't belong to the velociraptor category so I'll just give you my obfuscated Hello World in Bash as a form of revenge _2=($_1/*/*); ${_2[34]} -${_2[34]:5:1}'\110\145\154\154\157\54\40\127\157\162\154\144\41' \$\endgroup\$
    – user16402
    Commented Jun 9, 2014 at 20:20

22 Answers 22

30
\$\begingroup\$

C

Must be compiled to 32bit. On 64bit machines use gcc -m32 or such.

#include <stdlib.h>

int main() {
    char *c = "echo Just another C hacker";
    int foo=123; //unused                          /* Warning: there's a
    int k=(int)1                                    * (long) system
    //now for the fun part!                         * of chinese boxes
    //behold:                                       * in this code. */
    +0;
    -1;
    ((int(*)(char *))k)(c);
}

Disclaimer: not my idea. I found it years ago hidden in some piece of code. Seriously. Theirs was even better, I forgot several little details. But the gist is there.

When you see it, you'll sh*t bricks.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ What the...? Can you explain how/why this works? \$\endgroup\$
    – arshajii
    Commented Jul 27, 2013 at 15:07
  • 1
    \$\begingroup\$ HA! @arshajii, it's all smoke and mirrors. I don't want to explain it away here, but read the code more closely. \$\endgroup\$
    – breadbox
    Commented Jul 27, 2013 at 16:07
  • 6
    \$\begingroup\$ ... That's fairly horrible. +1 \$\endgroup\$
    – Hasturkun
    Commented Jul 28, 2013 at 11:52
  • \$\begingroup\$ @Hasturkun Thanks. I did strive for the worst. For a moment I considered putting an "rm -rf ~" somewhere, but it'd have been unkind ;-) \$\endgroup\$
    – Tobia
    Commented Jul 29, 2013 at 9:59
  • 2
    \$\begingroup\$ @bread Ah! The /* is commented out! facepalm :-P \$\endgroup\$
    – Doorknob
    Commented Dec 24, 2013 at 4:13
6
\$\begingroup\$

Mathematica:

TextRecognize@
 ImageAssemble@
  Transpose@
   ImagePartition[Import@"https://i.sstatic.net/S9fci.png", 5] 
\$\endgroup\$
6
\$\begingroup\$

Dart

class Print{
  var PrinT,print,prinT;
  get PRint() => PrinT;
  get pRInt() => 'A$prinT';
  get pRint() => print;
  set pRInt(PrinT){print=PrinT;}
  set prInt(pRInt){prinT='n$pRInt';}
  Print(prinT,PRINT){
    PrinT = prinT;
    prInt = PRINT;
  }
  PRINT(print,PrinT){
    pRint.PRint('$print ${pRint.pRInt} $PRint $PrinT');
  }
  Print.print(print,prinT){
    pRInt = new Print(print,'other');
    PrinT = prinT;
  }
}
main(){
  Print print = new Print.print(print,'Dart');
  print.PRINT('Just','Hacker');
}

Edit : less boring setter, less boring getter.

I have studied this language for a day, so I think other people may think this as a child's mess... :(

\$\endgroup\$
2
  • 1
    \$\begingroup\$ props for early adoption, I will bend my rules and vote you up. Lets see what the judges (community) thinks \$\endgroup\$ Commented Oct 12, 2011 at 3:23
  • \$\begingroup\$ I agree with Joel. \$\endgroup\$
    – DocMax
    Commented Oct 15, 2011 at 6:48
6
\$\begingroup\$

PRNG

It's in C, but it actually shows off that you can do cool things using PRNGs and outputs Just another PRNG hacker:

#include <stdio.h>

#define P 0x3A4B5C6D

char s[6];
int j, t;

void r(int d) {
  t = ((P * d + P) << 17) + ((P * d - P) >> 15) + P;
  for (j = 0; j < 5; j++) {
    s[j] = (t % 51) + 67;
    t /= 51;
    if ((s[j] >= 91) && (s[j] <= 96)) s[j] = 32;
  }
  printf("%s", s);
}

int main() {
  r(0x444C725);
  r(0x2D65DD4B);
  r(0x6C5C71A);
  r(0xB2A4BBD);
  r(0x275BD6F);
  return 0;
}

Using the built-in PRNG (srand, rand) would be possible, too, but less portable.

\$\endgroup\$
1
  • \$\begingroup\$ WOW. what... I... oh man \$\endgroup\$
    – TehShrike
    Commented Oct 30, 2011 at 11:49
5
\$\begingroup\$

C

int main(int _)
{
    putchar(~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(~-~-~-~-~-~-
    putchar(-~-~-~-~-~-~-~-~
    putchar(-~-~
    putchar(~-~-~-~-~-~-~-
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(~-~-~-
    putchar(~-~-~-~-~-~-~-~-~-~-~-~-
    putchar(-~-~-~-~-~
    putchar(-~
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    putchar(-~
    putchar(~-~-
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
    putchar(-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~_
    ))))))))))))))))))))));
}
\$\endgroup\$
4
\$\begingroup\$

Python

credits.__class__(0,'Just another Python hacker')()
\$\endgroup\$
2
  • \$\begingroup\$ What is obfuscated about this? \$\endgroup\$
    – qqq
    Commented Feb 28, 2018 at 4:38
  • \$\begingroup\$ The method, of couse \$\endgroup\$
    – etuardu
    Commented Mar 13, 2018 at 12:40
3
\$\begingroup\$

Javascript

eval('Acy419yt=12-14;'.split('').map(function(x){return String.fromCharCode(
0240-x.charCodeAt(0))}).join(''))[_]((___='splitulengthureverseujoinufilter'
.split('\x75'),function __(_){return _[___[1]]?__(_[___[0][0]+___[___[3]](''
)[___[0]]('')[___[4]](function(_,__){return ~~(__/2)==1})[___[3]]('')+'ce'](
1))+_[0]:_}("Just Another JavaScript Hacker"))[___[0]]('')[___[2]]()[___[3]](''));

In my code, JAJSH text was encrypted by reversing it, not only once, but twice!! Ha! Can you find it?

\$\endgroup\$
2
\$\begingroup\$

Haskell

I did this one with some help.

{-# LANGUAGE ForeignFunctionInterface #-}

import Control.Applicative
import Control.Monad
import Foreign
import Foreign.C

foreign import ccall "stdio.h puts"
    puts :: CString -> IO ()

main :: IO ()
main = liftM2 allocaBytes length
       ((<*> puts) . ((>>) .) . flip (flip zipWithM_ [0..] . pokeElemOff))
     $ map (fromIntegral . fromEnum) "Just another Haskell hacker\0"

And just for fun:

{-# LANGUAGE ForeignFunctionInterface #-}

import Control.Exception
import Control.Monad
import Data.Bits
import Data.Word
import Foreign
import Foreign.C

foreign import ccall "stdlib.h realloc"
    c_realloc :: Ptr a -> CSize -> IO (Ptr a)

foreign import ccall "stdlib.h free"
    c_free :: Ptr a -> IO ()

foreign import ccall "stdio.h puts"
    c_puts :: CString -> IO ()

-- | Write a UTF-8 character into a buffer.
--
-- Return the length of the character in bytes, which will be a number from 1-4.
pokeUtf8 :: Ptr Word8 -> Char -> IO Int
pokeUtf8 ptr char =
    case (fromIntegral . fromEnum) char :: Word32 of
        c | c <= 0x7F -> do
            put ptr c
            return 1
        c | c <= 0x7FF -> do
            put ptr                 (0xC0 .|. c `shiftR` 6)
            put (ptr `plusPtr` 1)   (0x80 .|. c .&. 0x3F)
            return 2
        c | c <= 0xFFFF ->
            if c >= 0xD800 && c <= 0xDFFF
                then replacement
                else do
                    put ptr                 (0xE0 .|. c `shiftR` 12)
                    put (ptr `plusPtr` 1)   (0x80 .|. c `shiftR` 6 .&. 0x3F)
                    put (ptr `plusPtr` 2)   (0x80 .|. c .&. 0x3F)
                    return 3
        c | c <= 0x10FFFF -> do
            put ptr                 (0xF0 .|. c `shiftR` 18)
            put (ptr `plusPtr` 1)   (0x80 .|. c `shiftR` 12 .&. 0x3F)
            put (ptr `plusPtr` 2)   (0x80 .|. c `shiftR` 6 .&. 0x3F)
            put (ptr `plusPtr` 3)   (0x80 .|. c .&. 0x3F)
            return 4
        _ -> replacement
    where
        put p c = poke p (fromIntegral c :: Word8)
        replacement = pokeUtf8 ptr '\xFFFD'

withUtf8 :: String -> (CStringLen -> IO a) -> IO a
withUtf8 string action = expand nullPtr 64 0 string where
    expand buf bufsize pos str = do
        buf' <- c_realloc buf (fromIntegral bufsize)
        when (buf' == nullPtr) $ do
            c_free buf
            ioError $ userError "Out of memory"
        write buf' bufsize pos str

    write buf bufsize pos str
        | bufsize - pos < 4 = expand buf (bufsize * 2) pos str
        | otherwise = do
            case str of
                (c:cs) -> do
                    len <- pokeUtf8 (buf `plusPtr` pos) c
                    write buf bufsize (pos + len) cs
                [] -> do
                    pokeByteOff buf pos (0 :: Word8)
                    finish buf pos

    finish buf len =
        finally (action (buf, len)) (c_free buf)

puts :: String -> IO ()
puts str = withUtf8 str (c_puts . fst)

main :: IO ()
main = puts "\x266B Just another C hacker using Haskell \x266B"
\$\endgroup\$
2
\$\begingroup\$

JavaScript

Run in console

({}+[])[!''+!''+!![]] + (!![]+[])[!''+!''] + (![]+[])[!''+!''+!''] + (!![]+[])[+![]] + ({}+[])[!![]+!''+!''+!''+!''+!''+!''] + (![]+[])[+!![]] + ([][{}]+[])[+!![]] + ({}+[])[+!''] +
(!![]+[])[+![]] + 'h' + (![]+[])[!''+!''+!![]+!![]] + (!![]+[])[+!![]] + ({}+[])[!![]+!![]+!''+!''+!''+!''+!''] + ({}+[])[!![]+!''+!![]] + (![]+[])[!![]+!''+!![]] + 
({}+[])[!![]+!![]+!![]+!![]+!''+!![]+!![]] + 'h' + (![]+[])[+!![]] + ({}+[])[!![]+!![]+!''+!![]+!![]] + 'k' + (![]+[])[!''+!![]+!![]+!''] + (!![]+[])[+!'']
\$\endgroup\$
2
\$\begingroup\$

Python 2.x (single expression)

Now, while this is quite easy to figure out for Pythoneers, others might find it at least interesting. If you wonder why there's so many lambdas, I wanted to have maximum underscoreness, but minimal repetition. Who doesn't love underscores? Ideone

(lambda ______________:(lambda ______,_______,________:(lambda _____:(lambda _,___,__,____,_____________:(lambda _________,__________:(lambda ___________,____________:___________(____________,____[_________**(_________+__________)-__________::_________+_________+_________]+_[__________::_________]+__[_________+__________])(____________,______________))((lambda _,__:________(______(_))[__]),(________(__import__(_[_________]+__[_________*_________+__________]+_[_________]))[_[_________:_________+_________]+___[__________/_________]+__[__________]+_____(u'')[__________/_________]+_[_________+__________]])))((_____________(_)+_____________(_))/_____________(_),_____________(_)/_____________(_)))(_____([]),_____({}),_____(None),_____({}.__iter__),lambda _:len(_)))(lambda _:_______(______(_))))((lambda _:_.__class__),(lambda _:_.__name__),(lambda _:_.__dict__)))('Just another Python Hacker\n')

An indented version if you prefer:

(lambda ______________:
    (lambda ______,_______,________:
        (lambda _____:
            (lambda _,___,__,____,_____________:
                (lambda _________,__________:
                    (lambda ___________,____________:
                        ___________(____________,____[_________**(_________+__________)-__________::_________+_________+_________]+_[__________::_________]+__[_________+__________])(____________,______________)) (
                        (lambda _,__:________(______(_))[__]),
                        (________(__import__(_[_________]+__[_________*_________+__________]+_[_________]))[_[_________:_________+_________]+___[__________/_________]+__[__________]+_____(u'')[__________/_________]+_[_________+__________]]))) (
                    (_____________(_)+_____________(_))/_____________(_),
                    _____________(_)/_____________(_))) (
                _____([]),
                _____({}),
                _____(None),
                _____({}.__iter__),
                lambda _:len(_))) (
            lambda _:_______(______(_)))) (
        (lambda _:_.__class__),
        (lambda _:_.__name__),
        (lambda _:_.__dict__)))('Just another Python Hacker\n')

This defines a function and calls it with 'Just another Python Hacker'. Now, it didn't have to be a function, but I thought it would be more elegant.

f = (lambda ______________:(lambda ______,_______,________:(lambda _____:(lambda _,___,__,____,_____________:(lambda _________,__________:(lambda ___________,____________:___________(____________,____[_________**(_________+__________)-__________::_________+_________+_________]+_[__________::_________]+__[_________+__________])(____________,______________))((lambda _,__:________(______(_))[__]),(________(__import__(_[_________]+__[_________*_________+__________]+_[_________]))[_[_________:_________+_________]+___[__________/_________]+__[__________]+_____(u'')[__________/_________]+_[_________+__________]])))((_____________(_)+_____________(_))/_____________(_),_____________(_)/_____________(_)))(_____([]),_____({}),_____(None),_____({}.__iter__),lambda _:len(_)))(lambda _:_______(______(_))))((lambda _:_.__class__),(lambda _:_.__name__),(lambda _:_.__dict__)))
f('Hello.\n')
f('Just another Python Hacker here.\n')
\$\endgroup\$
2
  • \$\begingroup\$ Oh, it's exactly 900 bytes. That is completely unintentional and awesome. \$\endgroup\$
    – seequ
    Commented Jun 10, 2014 at 9:17
  • \$\begingroup\$ And apparently it only works with Python 2.x \$\endgroup\$
    – seequ
    Commented Jun 10, 2014 at 15:31
2
\$\begingroup\$

QBasic

Here's my implementation in QBasic. The program must be called "JAQBH.BAS" in or for this to execute properly, as it reads its own source as part of the program. And I couldn't find any sane way of determining the name of the currently running script.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"
\$\endgroup\$
6
  • \$\begingroup\$ is there any good way to compile or run qbasic under ubuntu? I tried a google search, installed freebasic and its giving me all kinds of errors. \$\endgroup\$ Commented Oct 2, 2011 at 4:15
  • \$\begingroup\$ this might work - repl.it (Uh, just tried it for this and it fails.) \$\endgroup\$
    – DanBeale
    Commented Oct 2, 2011 at 6:35
  • \$\begingroup\$ I don't imagine any online versions would allow writing of files \$\endgroup\$
    – Kibbee
    Commented Oct 2, 2011 at 11:36
  • 1
    \$\begingroup\$ Perhaps you could run it in DOSBOX \$\endgroup\$
    – Kibbee
    Commented Oct 2, 2011 at 11:37
  • \$\begingroup\$ I tested it in DOSBOX and it works perfectly. \$\endgroup\$
    – mellamokb
    Commented Oct 3, 2011 at 16:46
1
\$\begingroup\$

Haskell

Fun with monad transformers:

import Control.Monad.State
import Control.Monad.Writer

newtype A a = A (Maybe a)
newtype B = B { c :: String }

instance Show a => Show (A a) where
   show (A x) = show x

instance Show B where
   show = c

s = [97, 13, 1, 5, -12, -3, 13, -82, 40, 25, 18,
     -8, -6, 7, 0, -76, 72, -7, 2, 8, -6, 13]

main = print . A . fmap B . execWriterT . flip evalStateT 0 . mapM f $ s
  where f x = modify (+x) >> get >>= tell . return . toEnum
\$\endgroup\$
1
\$\begingroup\$

Scala

val bi = BigInt ("467385418330892203511763656169505613527047619265237915231602")
bi.toByteArray.map (_.toChar).mkString
\$\endgroup\$
1
\$\begingroup\$

Postscript.

Creates a custom font with which to display the text.

%!
100 200[>>begin
(Encoding{}FontType 3
 BuildChar{exch begin 10 0 setcharwidth load exec stroke end}
 FontMatrix .1 0 0 .1 0 0 FontBBox 0 0 10 10) 
{token{exch}{exit}ifelse}loop
{4 6}{array astore def}forall
/c{1 string cvs 0 get}4{def}repeat
/J c{7 9 moveto 7 2 lineto 6 4 1 360 190 arcn}
/A c{2 2 moveto 5 8 lineto 8 2 lineto}
/P c{3 2 moveto 3 8 lineto 3 6 2 90 270 arcn}
/s c{5 7 2 0 270 arc 5 3 2 90 180 arcn}
/H c{2 2 moveto 2 8 lineto 8 8 moveto 8 2 lineto 2 4 moveto 8 4 lineto}5{def}repeat
/F currentdict end definefont 20 scalefont setfont
moveto(JAPsH)show
\$\endgroup\$
1
\$\begingroup\$

Ruby

Had two ideas and ended up combining them.

def Object.const_missing(const)
  define_method(:method_missing) do |meth,*args|
    "#{meth}"['i'] ? ->a{not$*<<a.pop} :print(meth)
  end[const,$\=' ']
end

Begin

case %w[Just another ruby hacker]
when tick
  puts 'tock'
when tick
  puts 'tock'
when tick
  puts 'tock'
when tick
  puts 'tock'
else
  eval($**$\)
end
\$\endgroup\$
1
\$\begingroup\$

Ruby 1.9

Cheesy, highly implementation-dependent, but I hope you find it spooky.

class Object
    define_method(:!) do |n=3|
        send(methods.find{|la|la[/[slappy]{#{n}}/]})
    end
end

(!!!:!).!(5) unless respond_to?('Just another ruby hacker,')

Edit: Proof

\$\endgroup\$
1
\$\begingroup\$

Python

My JAPH in Python

class Foo:
    def __init__(s, t='Just another Python hacker'):
        def g():
            return [100,101,102,32,102,
                    40,120,41,58,112,114,
                    105,110,116,32,120],t
        s.g = g()
        class Z():
            def __add__(s,x):return x
        s.z = sum((chr(i)for i in s.g[0]),Z())
    def __call__(s,t):
        return t.join(map(chr,s))
    def __iter__(s):
        return (ord(i) for i in `s`)
    def __repr__(s):
        return s.g[-1]
    def __getitem__(s, x):
        exec s.z
        f(s(x))
Foo()['']
\$\endgroup\$
0
\$\begingroup\$

JavaScript

eval (atob("ZnVuY3Rpb24gcHJpbnQoKSB7CmZ1bmN0aW9uIHRyKGEsYikgewogICAgcmV0dXJuIGEubWFwKGZ1bmN0aW9uKHgpewogICAgICAgIHJldHVybiB4LnRvU3RyaW5nKGIpOwogICAgfSkuam9pbignICcpOwp9CgoKdmFyIGEgPSJXemt5TmpNNE1Td3lNekl3TURJek1UYzNPU3d4TVRnMU5UTTNMREV3TkRVek1EYzBOelZkIjsKYSA9IGF0b2IoYSk7CmEgPSBKU09OLnBhcnNlKGEpOwphID0gdHIoYSwzNik7CmNvbnNvbGUubG9nKGEpOwp9"));
print();
\$\endgroup\$
0
\$\begingroup\$

Lua/RProgN

print "Just "           --                         Write Just to the Console--
print "Another "        --                      Write Another to the Console--
print "Lua "            --           Write Lua, definitely NOT  [ 'RProgN' ]--
print "Hacker "         -- Do u really thing u r an hacker like i [ ur NOT ]--

I'm sure there's a better and sneakier way to combine these two languages. Hiding in comments is just so overused.

Try the Lua Out

Try the RProgN Out

\$\endgroup\$
0
\$\begingroup\$

Operation Flashpoint scripting language

removeAllWeapons player
s = primaryWeapon player
call = "scripting " else "language "

a = [if true, if false]
b = ["s=s+(call select 0)", format["s=s+(call select 1)%1%2=%3", {;}, "call", {nil}]]

a select 0 then b
a select 1 then b

a = a + getPos player + [{Just another} + format ([" %1 %2 "] + ("Operation" ELSE "Flashpoint"))]

"b = format[""%2%1%3."", s, _x, call""""""hacker""""""]" count a

titleText (b else "plain")

exit

Save as ofp.sqs (or any other name), and call with [] exec "ofp.sqs".

Output:

\$\endgroup\$
0
\$\begingroup\$

Canvas

³{┤:js nte avshce@;utaohrcna akr@})∑╷

...which should work, but on strings hasn't been implemented yet. Hooray for dead projects! The working version uses the same logic, but is a bit... less obfuscated.

Try it online! (working version)

\$\endgroup\$
0
\$\begingroup\$

Perl on OSX 10.7+ (requires Xcode)

#!/usr/bin/perl
use Inline C=>q{int g(){atexit("j\31\350\31\0\0\0Just \
another Perl hacker\n1\300@\220\17\204\n\0\0\0j\1k\4\x\
cd\x80\203\304\20\303^j\1_Z\270\4\0\0\2\17\5\303");}};g
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.