Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

boku no ichiban JAPH (#1 JAPH)

by bladx (Chaplain)
on Sep 01, 2001 at 06:18 UTC ( #109598=obfuscated: print w/replies, xml ) Need Help??

I am stupid for thinking that creating JAPH's was simple as baking a NodeReaper cherry pie. I was dead wrong. So I tried my hand at making a rather large (unfortunately,) JAPH, which is in fact, my first attempt. I didn't look at any other JAPH code, to create it, and it does in fact, look different, if you run the code. Hopefully the letters of the JAPH will look more creative than just the plain lettering does, but anyhow. Here is the code:

#!/usr/bin/perl -w use strict; my @a = qw(j a p h); my ($n,$s,$t) = ("\n"," ","\t"); fo +r (my $x=0; $x<=10; $x++) { print $s x5,$a[0]x$x; print $s x5,$a[1]x$ +x; print $s x5,$a[2]x$x; if ($x <= 6) { if ($x == 1) { print $a[2]x9; + } elsif ($x == 6) { print $a[2]x9; } else{ print $s x5,$a[2]x$x; } } + if ($x == 6) { print $s x6,$a[3]x$x; } elsif ($x > 6) { print $s x14 +,$a[3]x$x; } else { print $s x5,$a[3]x$x; } print $s x9,$a[3]x$x; pri +nt $n; } my $w=13; for (my $x=0; $x<=3; $x++) { print $s x$x,$a[0]x +$w; print $s x6,$a[1]x3; if ($x == 1) { print $a[1]x9; } else { print + $s,$s,$s x3,$a[1]x3; } print $s x6,$a[2]x8; print $s x13,$a[3]x12; i +f ($x == 1) { print $a[3]x18; } else { print $s x7,$a[3]x12; } print +$n; $w-=3; }

Hopefully it isn't that dumb for my first one... it is different, but rather long winded, and hopefully if I create another one someday, I will shorten it a lot, to produce a similar JAPH.

Andy Summers

Replies are listed 'Best First'.
( off topic ) Re: boku no ichiban JAPH (#1 JAPH)
by lestrrat (Deacon) on Sep 01, 2001 at 11:48 UTC

    I have a feeling you meant to say "my first JAPH" with "Boku no ichiban ...". Unfortunately, that doesn't mean "My first...". So here goes a little lesson on Japanese... :-)

    "Ichiban" is, literally translated, "number one". Which denotes "top", "best in a category", or "number one in a series of something". In this context you lack the something portion of it, so the phrase becomes a little confusing

    You want to use the word "Hajimete-no" instead. That literally means "first", as in "I've never done this before".

    ( Even if you meant JAPH #1 in a series of JAPHs, it should probably be JAPH ichiban, as in JAPH no. 1 )

      ... and leave out the Boku no.
      Perl and Japanese have one thing in common: A lot of zero pronouns in colloquial and formal speech.

        Alright ... thanks for the language help! I am very new to Japanese, and have been only self-studying ... my vocab is like 200 or a little less words that I remember, so I need to work on learning some more, and using them in correct context (^_^) thanks for the help.

        Andy Summers
        Well... but in formal speech, I often hear people use pronouns regardless.
Re: boku no ichiban JAPH (#1 JAPH)
by bladx (Chaplain) on Sep 01, 2001 at 08:10 UTC
    Well since it seems that my first attempt at a JAPH didn't go so well, what can I do differently to make it better next time?

    Andy Summers

      I gather you picked up a couple of quick downvotes on this node, though it's not in negative rep now so I don't know for sure. It's possible that you have been blessed with some personality down-voting, or some people just didn't like your Obfu style. In any case, the balance seems now to be in your favor, on whichever count it's being reckoned. The node I'm replying to still is negative, and may well remain so, because people don't like it when you complain about downvotes (vicious cycle all the way).

      However, since you asked, I'll try to offer a couple constructive comments about the root node.

      • First, it's a neat idea, and the output is cute, and for this I congratulate you.
      • Second, it's annoying that it's all on one line--little red plusses don't make it harder to understand the code, they just create visual noise.
      • Third, it's not really obfuscated. It's a very reasonable code structure, and you've executed it perfectly well, but simply taking out all the newlines does not an Obfu make.

      I am not particularly qualified to preach on (intentional) obfuscation, but if I were to try I would say more or less this:

      The point of an Obfu (as I understand it) is not to be hard to read (though that comes naturally a lot of the time), but to be hard to understand: consider Things are not what they seem like., which is incredibly easy to read but takes a lot of effort to understand (especially normalized for the number of characters of code). If line-noise is more what you're looking for, you can find some classic examples here--I won't try to point you toward any particular one, look at them all (I like different ones depending on my mood).

      But what all of these have in common is making you look twice, and say "whoa, how'd that happen?" and that is what this code does not do.

      If God had meant us to fly, he would *never* have given us the railroads.
          --Michael Flanders

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://109598]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2017-12-11 15:23 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (305 votes). Check out past polls.