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

77%
+5 −0
Challenges Print the Great Numeric Pyramid

Canvas, 19 bytes ‾-{{╷¹²-m‾-¹-m] *]/ Try it here! ‾-{{╷¹²-m‾-¹-m] *]/ Program, ascii-fied for monospacing ‾- push 28 { ] for 1…28 (pushing counter & s...

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

Answer
#2: Post edited by user avatar dzaima‭ · 2020-11-14T18:58:40Z (over 3 years ago)
  • # [Canvas](https://github.com/dzaima/Canvas), 19 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
  • ‾-{{╷¹²-m‾-¹-m] *]/
  • [Try it here!](https://dzaima.github.io/Canvas/?u=JXUyMDNFJXVGRjBEJXVGRjVCJXVGRjVCJXUyNTc3JUI5JUIyJXVGRjBEJXVGRjREJXUyMDNFJXVGRjBEJUI5JXVGRjBEJXVGRjREJXVGRjNEJTIwJXVGRjBBJXVGRjNEJXVGRjBG,v=8)
  • ```
  • ‾-{{╷¹²-m‾-¹-m] *]/ Program, ascii-fied for monospacing
  • ‾- push 28
  • { ] for 1…28 (pushing counter & saving in ¹):
  • { ] for 1…counter (pushing counter & saving in ²):
  • ╷ decrement the counter
  • ¹²- push ¹-²
  • m minimum of top 2; min(²-1, ¹-²)
  • ‾-¹- push 28-¹
  • m minimum of top 2; min(²-1, ¹-², 28-¹)
  • * separate items with spaces
  • / pad lines with spaces to form a space diagonal on the left
  • ```
  • # [Canvas](https://github.com/dzaima/Canvas), 19 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
  • ‾-{{╷¹²-m‾-¹-m] *]/
  • [Try it here!](https://dzaima.github.io/Canvas/?u=JXUyMDNFJXVGRjBEJXVGRjVCJXVGRjVCJXUyNTc3JUI5JUIyJXVGRjBEJXVGRjREJXUyMDNFJXVGRjBEJUI5JXVGRjBEJXVGRjREJXVGRjNEJTIwJXVGRjBBJXVGRjNEJXVGRjBG,v=8)
  • ```text
  • ‾-{{╷¹²-m‾-¹-m] *]/ Program, ascii-fied for monospacing
  • ‾- push 28
  • { ] for 1…28 (pushing counter & saving in ¹):
  • { ] for 1…counter (pushing counter & saving in ²):
  • ╷ decrement the counter
  • ¹²- push ¹-²
  • m minimum of top 2; min(²-1, ¹-²)
  • ‾-¹- push 28-¹
  • m minimum of top 2; min(²-1, ¹-², 28-¹)
  • * separate items with spaces
  • / pad lines with spaces to form a space diagonal on the left
  • ```
#1: Initial revision by user avatar dzaima‭ · 2020-11-14T18:57:56Z (over 3 years ago)
# [Canvas](https://github.com/dzaima/Canvas), 19 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
    ‾-{{╷¹²-m‾-¹-m] *]/

[Try it here!](https://dzaima.github.io/Canvas/?u=JXUyMDNFJXVGRjBEJXVGRjVCJXVGRjVCJXUyNTc3JUI5JUIyJXVGRjBEJXVGRjREJXUyMDNFJXVGRjBEJUI5JXVGRjBEJXVGRjREJXVGRjNEJTIwJXVGRjBBJXVGRjNEJXVGRjBG,v=8)

```
‾-{{╷¹²-m‾-¹-m] *]/  Program, ascii-fied for monospacing
‾-                   push 28
  {              ]   for 1…28 (pushing counter & saving in ¹):
   {          ]        for 1…counter (pushing counter & saving in ²):
    ╷                    decrement the counter
     ¹²-                 push ¹-²
        m                minimum of top 2; min(²-1, ¹-²)
         ‾-¹-            push 28-¹
             m           minimum of top 2; min(²-1, ¹-², 28-¹)
                *      separate items with spaces
                  /  pad lines with spaces to form a space diagonal on the left
```