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

60%
+1 −0
Challenges Word Count Tool

Japt v2.0a0, 19 18 17 bytes I need more caffeine! Takes input as an array of lines. Output is a reversed array. [Uc¸¬U¬Ucq\s f]ml Try it - includes all test cases, header splits string on new...

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer
#6: Post edited by user avatar Shaggy‭ · 2021-06-22T16:58:08Z (almost 3 years ago)
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> <s>18</s> 17 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Takes input as an array of lines. Output is a reversed array.
  • [Uc¸¬U¬Ucq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&header=tw&code=W1VjuKxVrFVjcVxzIGZdbWw&footer=Vnc&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, header splits string on newlines for ease of input. footer reverse the output for easier verification.
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> <s>18</s> 17 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Takes input as an array of lines. Output is a reversed array.
  • [Uc¸¬U¬Ucq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&header=tw&code=W1VjuKxVrFVjcVxzIGZdbWw&footer=Vnc&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, header splits string on newlines for ease of input. footer reverse the output for easier verification.
  • [Uc¸¬U¬Ucq\s f]ml :Implicit input of array U
  • [ :Construct an array containing
  • Uc :1. Map U then flatten
  • ¸ : Join with spaces
  • ¬ : Join
  • U¬ :2. Join U
  • Uc :3. Map U then flatten
  • q : Split on
  • \s : Regex /\s/g
  • f : Filter, to remove empty strings
  • ] :End array
  • m :Map
  • l : Length
#5: Post edited by user avatar Shaggy‭ · 2021-06-21T11:31:48Z (almost 3 years ago)
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> <s>18</s> 17 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Takes input as an array of lines. Output is a reversed array.
  • [U·c¸¬U·¬Uq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isVbesVXFccyBmXW1s&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, header splits string on newlines for ease of input. footer reverse the output for easier verification.
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> <s>18</s> 17 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Takes input as an array of lines. Output is a reversed array.
  • [Uc¸¬U¬Ucq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&header=tw&code=W1VjuKxVrFVjcVxzIGZdbWw&footer=Vnc&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, header splits string on newlines for ease of input. footer reverse the output for easier verification.
#4: Post edited by user avatar Shaggy‭ · 2021-06-21T09:08:05Z (almost 3 years ago)
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> 18 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Output is reversed.
  • [U·c¸¬U·¬Uq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isVbesVXFccyBmXW1s&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, footer reverse the output for easier verification.
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> <s>18</s> 17 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Takes input as an array of lines. Output is a reversed array.
  • [U·c¸¬U·¬Uq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isVbesVXFccyBmXW1s&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, header splits string on newlines for ease of input. footer reverse the output for easier verification.
#3: Post edited by user avatar Shaggy‭ · 2021-06-21T08:58:35Z (almost 3 years ago)
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> 18 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Output is reversed.
  • [U·c¸¬U·¬Uq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isVbesVXFccyBmXW1s&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1R) - includes all test cases, footer reverse the output for easier verification.
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> 18 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Output is reversed.
  • [U·c¸¬U·¬Uq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isVbesVXFccyBmXW1s&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, footer reverse the output for easier verification.
#2: Post edited by user avatar Shaggy‭ · 2021-06-21T08:57:49Z (almost 3 years ago)
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, 19 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Output is reversed.
  • [U·c¸¬ÊU·¬ÊUè/\S+/]
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isylW3rMpV6C9cUysvXQ&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, footer reverse the output for easier verification.
  • # [Japt](https://github.com/ETHproductions/japt) v2.0a0, <s>19</s> 18 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
  • I need more caffeine!
  • Output is reversed.
  • [U·c¸¬U·¬Uq\s f]ml
  • [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isVbesVXFccyBmXW1s&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1R) - includes all test cases, footer reverse the output for easier verification.
#1: Initial revision by user avatar Shaggy‭ · 2021-06-21T08:45:55Z (almost 3 years ago)
# [Japt](https://github.com/ETHproductions/japt) v2.0a0, 19 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)

I need more caffeine!

Output is reversed.

    [U·c¸¬ÊU·¬ÊUè/\S+/]

[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=W1W3Y7isylW3rMpV6C9cUysvXQ&footer=dw&input=WwoiSGVsbG8gd29ybGQiCiJIM2xsMCAgdzByMWQiCiJIZWxsbyAJCndvcmxkIgoiCgoKIgoiICAgIgpdLW1S) - includes all test cases, footer reverse the output for easier verification.