HN user

acc54321

10 karma
Posts0
Comments7
View on HN
No posts found.
Gray Code 11 years ago

or in J

    graycodes=: verb define
        >(0&,&.>,1&,&.>@:|.)^:(<:y) 0 1
    )
    ' +'{~|:graycodes 6

                                ++++++++++++++++++++++++++++++++
                ++++++++++++++++++++++++++++++++                
        ++++++++++++++++                ++++++++++++++++        
    ++++++++        ++++++++        ++++++++        ++++++++    
  ++++    ++++    ++++    ++++    ++++    ++++    ++++    ++++  
 ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++

Don't use read or eval willy nilly. If you have to use read, at the very least turn off read-eval. I give up on trying to get an asterisk on each side of that variable. No form of escaping seems viable.

I'm more bothered by Python's lack of homoiconicity (thus no good macro facility) and poor performance when compared to Common Lisp.

Python feels a bit like a toy Lisp with all the adult parts hidden.

I hasn't been proven to be any faster than conventional machines under fair testing. It is unclear that it has any algorithmic advantage as of yet.