Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##Hoon , 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Hoon , 41 bytes

|*
*
`tape`(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "

##Hoon , 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "

Hoon , 41 bytes

|*
*
`tape`(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "
add link to urbit
Source Link

##Hoon##Hoon, 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "

##Hoon, 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "

##Hoon, 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "
fix explanation
Source Link

##Hoon, 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. BecauseLuckily, while Hoon has syntax to say what you should expect the size of an atom to be, it expectsdoesn't actually enforce that expectation. Even slamming a utf8 char though, and isn't implemented astoo-big atom with a fork based onspecific sized verification gate doesn't give back the high bitdefault value like it should. Naturally, it's still acceptedwe abuse this and it even prints correctly. Yaaay in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "

##Hoon, 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Because it expects a utf8 char though, and isn't implemented as a fork based on the high bit, it's still accepted and even prints correctly. Yaaay.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "

##Hoon, 41 bytes## |* * tape(turn +< |=(@ (cat 3 +< ' ')))

Takes advantage of not having to specify the tape of a wet gate (|*), and that arguments are places at +< to prevent having to name them.

There are actually two different types of strings in Hoon: tapes, and cords. tapes are (list @tD), while cords are simply @t. Think the difference between a vector and an array: tapes can be indexed into and manipulated easily, while cords are "static" and basically just bignums.

This entry maps over the characters in the tape it gets as input, and adds on the value of ' ' to the end of the atom and then casts the result back to a tape.

Technically, this should probably be a type error: tape is a list of characters, and we are stuffing two in the space of only one. Luckily, while Hoon has syntax to say what you should expect the size of an atom to be, it doesn't actually enforce that expectation. Even slamming a too-big atom with a specific sized verification gate doesn't give back the default value like it should. Naturally, we abuse this and it even prints correctly in the console, as long as you don't try to full-width text any UTF-8 characters.

Usage:

> %. "Full width text is text that has a space after every character, including the last one."
 |*
 *
 `tape`(turn +< |=(@ (cat 3 +< ' ')))
"F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e . "
Source Link
Loading

AltStyle によって変換されたページ (->オリジナル) /