Skip to main content
Commonmark migration
Source Link

#JAISBaL, 15 6 bytes

JAISBaL, 15 6 bytes

˗Y1˄N0

Explanation:

# \# enable verbose parsing #\
while               \# [0] start while loop #\
    printnumln 1    \# [1] print 1 #\
end                 \# [2] end current language construct #\
printnum 0          \# [3] print 0 #\

#JAISBaL, 15 6 bytes

˗Y1˄N0

Explanation:

# \# enable verbose parsing #\
while               \# [0] start while loop #\
    printnumln 1    \# [1] print 1 #\
end                 \# [2] end current language construct #\
printnum 0          \# [3] print 0 #\

JAISBaL, 15 6 bytes

˗Y1˄N0

Explanation:

# \# enable verbose parsing #\
while               \# [0] start while loop #\
    printnumln 1    \# [1] print 1 #\
end                 \# [2] end current language construct #\
printnum 0          \# [3] print 0 #\
deleted 1060 characters in body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26

#JAISBaL, 1515 6 bytes

or 11*

n˒q1˕-1˓e0®˗Y1˄N0

Explanation:

# \# enable verbose parsing #\
n}                \#while request input #\
ifelse            \# if the top value of the stack is truthy, execute the next block, otherwise, execute[0] thestart elsewhile blockloop #\
    printnumln 1  \# print 1 #\
    jump -1       \# jump[1] -1print instructions1 #\
    else          \# end the truthy section of the ifelse block #\
    printnum 0    \# print 0 #\
end               \#[2] end current language construct #\

Side note 1:

An alternative 10 (or 8*) byte version is:

nD˅q1˕-1

which does basically the same thing as the above, but uses the fact that JAISBaL outputs some information at the end of any program, including the remaining contents of the stack.

Explanation:

# \# enable verbose parsing #\
n}                  \# request input #\
duplicate           \# duplicate the top value of the stack #\
ifblock  printnum 0          \# if the top value of the stack is truthy, execute the next block #\
    printnumln 1    \#[3] print 1 #\
    jump -1         \# jump -1 instructions0 #\

*A few bytes are saved if the character encoding used is the JAISBaL Character Encoding Scheme **Tested on command line tool / gui 0.0.4

#JAISBaL, 15 bytes

or 11*

n˒q1˕-1˓e0®

Explanation:

# \# enable verbose parsing #\
n}                \# request input #\
ifelse            \# if the top value of the stack is truthy, execute the next block, otherwise, execute the else block #\
    printnumln 1  \# print 1 #\
    jump -1       \# jump -1 instructions #\
    else          \# end the truthy section of the ifelse block #\
    printnum 0    \# print 0 #\
end               \# end current language construct #\

Side note 1:

An alternative 10 (or 8*) byte version is:

nD˅q1˕-1

which does basically the same thing as the above, but uses the fact that JAISBaL outputs some information at the end of any program, including the remaining contents of the stack.

Explanation:

# \# enable verbose parsing #\
n}                  \# request input #\
duplicate           \# duplicate the top value of the stack #\
ifblock             \# if the top value of the stack is truthy, execute the next block #\
    printnumln 1    \# print 1 #\
    jump -1         \# jump -1 instructions #\

*A few bytes are saved if the character encoding used is the JAISBaL Character Encoding Scheme **Tested on command line tool / gui 0.0.4

#JAISBaL, 15 6 bytes

˗Y1˄N0

Explanation:

# \# enable verbose parsing #\
while               \# [0] start while loop #\
    printnumln 1    \# [1] print 1 #\
end                 \# [2] end current language construct #\
printnum 0          \# [3] print 0 #\
added 43 characters in body; edited body
Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26

#JAISBaL, 15 bytes

or 11*

n˒q1˕-1˓e0®

Explanation:

# \# enable verbose parsing #\
n}                \# request input #\
ifelse            \# if the top value of the stack is truthy, execute the next block, otherwise, execute the else block #\
    printnumln 1  \# print 1 #\
    jump -1       \# jump -1 instructions #\
    else          \# end the truthy section of the ifelse block #\
    printnum 0    \# print 0 #\
end               \# end current language construct #\

Side note 1:

An alternative 10 (or 8*) byte version is:

nD˅q1˕-1

which does basically the same thing as the above, but uses the fact that JAISBaL outputs some information at the end of any program, including the remaining contents of the stack.

Explanation:

# \# enable verbose parsing #\
n}                  \# request input #\
duplicate           \# duplicate the top value of the stack #\
ifblock             \# if the top value of the stack is truthy, execute the next block #\
    printnumln 1    \# print 1 #\
    jump -1         \# jump -1 instructions #\

*A few bytes are saved if the character encoding used is the JAISBaL Character Encoding Scheme **Tested on command line tool / gui 0.0.4

#JAISBaL, 15 bytes

or 11*

n˒q1˕-1˓e0®

Explanation:

# \# enable verbose parsing #\
n}                \# request input #\
ifelse            \# if the top value of the stack is truthy, execute the next block, otherwise, execute the else block #\
    printnumln 1  \# print 1 #\
    jump -1       \# jump -1 instructions #\
    else          \# end the truthy section of the ifelse block #\
    printnum 0    \# print 0 #\
end               \# end current language construct #\

Side note 1:

An alternative 10 (or 8*) byte version is:

nD˅q1˕-1

which does basically the same thing as the above, but uses the fact that JAISBaL outputs some information at the end of any program, including the remaining contents of the stack.

Explanation:

# \# enable verbose parsing #\
n}                  \# request input #\
duplicate           \# duplicate the top value of the stack #\
ifblock             \# if the top value of the stack is truthy, execute the next block #\
    printnumln 1    \# print 1 #\
    jump -1         \# jump -1 instructions #\

*A few bytes are saved if the character encoding used is the JAISBaL Character Encoding Scheme

#JAISBaL, 15 bytes

or 11*

n˒q1˕-1˓e0®

Explanation:

# \# enable verbose parsing #\
n}                \# request input #\
ifelse            \# if the top value of the stack is truthy, execute the next block, otherwise, execute the else block #\
    printnumln 1  \# print 1 #\
    jump -1       \# jump -1 instructions #\
    else          \# end the truthy section of the ifelse block #\
    printnum 0    \# print 0 #\
end               \# end current language construct #\

Side note 1:

An alternative 10 (or 8*) byte version is:

nD˅q1˕-1

which does basically the same thing as the above, but uses the fact that JAISBaL outputs some information at the end of any program, including the remaining contents of the stack.

Explanation:

# \# enable verbose parsing #\
n}                  \# request input #\
duplicate           \# duplicate the top value of the stack #\
ifblock             \# if the top value of the stack is truthy, execute the next block #\
    printnumln 1    \# print 1 #\
    jump -1         \# jump -1 instructions #\

*A few bytes are saved if the character encoding used is the JAISBaL Character Encoding Scheme **Tested on command line tool / gui 0.0.4

Source Link
Socratic Phoenix
  • 1.7k
  • 1
  • 11
  • 26
Loading