Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Re: Re: Is Perl less compact than Ruby? (Kind of competition)

by jynx (Priest)
on Feb 19, 2002 at 19:41 UTC ( #146431=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Is Perl less compact than Ruby? (Kind of competition)
in thread Is Perl less compact than Ruby? (Kind of competition)

my testing has been limited,

i've only been using hello.eta and hello2.eta, but using | seems to be equivalent to || there. i tested both ways and they seem to work okay on the two hello programs. did your tests come out differently? if so, which programs should i be testing with (that is, which are more indicative of a real ETA program?)

As for the tic-tac-toe program, no matter which of the recent incarnations of the perl program i try, it seems to hang after i've given it input. does it just take a really long time or is it still running?


Replies are listed 'Best First'.
a little explanation
by mtve (Deacon) on Feb 20, 2002 at 10:13 UTC

    'i' is input operator of language, it must push on stack ascii code or -1 on eof.

    ord getc||-1 is excellent, although it's makes impossible to input NULL charaster. Again it's nice question of compatibility that I'm giving up to judge. It will be considered as cheating for sure.

    Update: oops, looks like previous version is also lame here (update2: not!)

    Update2: some perl black magic here:

    • zero is false but "\0" is true.
    • contrary to perlop doc's operator precedence, "ord getc||-1;" means "ord(getc)||-1" not "ord(getc||-1)".

    Update3: Second claim is lying, see "perldoc perlop/named unary operators"

Re: Re: Re: Re: Is Perl less compact than Ruby? (Kind of competition)
by dragonchild (Archbishop) on Feb 19, 2002 at 21:42 UTC
    Use the tic-tac-toe program referenced in the root node.

    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146431]
[shmem]: LanX: now I have to find a succinct transformation FOOL => MONK
[LanX]: yeah but Marto already proposed a new "Lex Sun-D" ...
[karlgoethebier]: the word really exists: http://www. urbandictionary. com/define.php? term=fool
[shmem]: ...possibly involving RTFM
[karlgoethebier]: big surprise!
[Eily]: LanX I try to avoid answering, but I did feel that this one post was going into much detail to prove a false claim (that SHA-1 is secure, I was just wrong about how insecure it is)
[LanX]: ironically...
[LanX]: yeah whatever ... I'm in the favorable condition to already autohiding him ... how can I judge the poor FOOLs who still see his contributions xD
[Eily]: he's been pretty saavy about threads that were implictly about him in the past. I think he might have deliberatly avoiding mentioning it for some reason (he got tired?)
[Eily]: he did mention one of his propositions: basically make it possible to ignore downvotes, by separating them more from the upvotes

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-07-24 17:21 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (356 votes). Check out past polls.