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

#Shtriped , 20 bytes

Shtriped , 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

#Shtriped , 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

Shtriped , 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Shtriped, 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

#Shtriped, 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

#Shtriped, 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

Source Link
Calvin's Hobbies
  • 90.7k
  • 46
  • 348
  • 565

#Shtriped, 20 bytes

e )
"
 r )
 s )
 "
"

This cheekily demonstrates that nearly any printable ASCII string is a valid identifier in Shtriped.

How it works:

e ) \ declares a variable named )
" \ defines a function with 0 arguments named "
 r ) \ gets a line of string input, saving it to )
 s ) \ prints ) as a string
 " \ recursively calls ", effectively looping forever
" \ calls " from the main scope to get things started

There's no real way to detect EOF, so this loops forever like the Python answer.

You can easily make it stop when an empty line is given though (30 bytes):

e )
"
 r )
 d ) \ tries to decrement ), if it was the empty string, aka 0, it can't, so 0 is returned all the way up
 i ) \ increment ) to put it back to normal after possibly decrementing
 s )
 "
"

Note that Shtriped I/O only supports printable ASCII, tabs, line feeds, carriage returns, vertical tabs, and form feeds (100 chars in total). This is because internally, strings are represented as non-negative arbitrary precision integers, and there must be a finite alphabet of characters to be able to encode all strings.

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