Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

81%
+7 −0
Challenges Reverse an ASCII string

Brain-Flak, 12 bytes {({}<>)<>}<> Try it online! # (Implicitly) Read characters from STDIN and place them all on the active stack # While the top of the active stack is no...

posted 3y ago by DJMcMayhem‭

Answer
#1: Initial revision by user avatar DJMcMayhem‭ · 2021-01-03T07:38:16Z (over 3 years ago)
# [Brain-Flak], 12 bytes

    {({}<>)<>}<>

[Try it online!][TIO-kjgtjwwz]

[Brain-Flak]: https://github.com/DJMcMayhem/Brain-Flak
[TIO-kjgtjwwz]: https://tio.run/##SypKzMzTTctJzP7/v1qjutbGTtPGDkj@/1@cmJKTlp2VWJxi/V83GQA "Brain-Flak – Try It Online"

    # (Implicitly) Read characters from STDIN and place them all on the active stack
    
    # While the top of the active stack is not null...
    {
        # Push the following value on to the active stack
        (
            # Pop the current character off the active stack and add it to the value we're tracking
            {}
            
            # Toggle which stack is active
            <>
        # (push)
        )
    
        # Toggle back to the stack the input was on
        <>
    
    # (endwhile)
    }
    
    # Toggle stacks back so that the secondary stack is active when the program ends
    <>
    
    # (Implicitly) Print all values on the active stack