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 »

Posts by Razetime‭

107 posts
60%
+1 −0
Challenges Mediocre pop count

APL (Dyalog APL), 61 bytes {⍵/⍨~(⊢∊⌊/,⌈/)+⌿0 1↓2⊥⍣¯1⊢0,⎕UCS⍵} Attempt This Online! APL's style of filter works very well here, since we can check for the max and min elements here: (⊢∊⌊/,⌈/) ...

posted 4y ago by Razetime‭

Answer
60%
+1 −0
Challenges Keyword golfing

BQN, 107 bytes A↩C←A⇐¯π{_𝕣_:@;/⊏𝕩.y?𝕗‿∊𝕊⟨𝕤,⍷⟩𝕏𝕎𝔽𝕨𝔾𝕘}∞˙⌜˘¨´˝`(•Js⎉⊔⎊⌽⌾⍉⚇«∘»·∧○∨⍋⍒↑↓≍∾˜⥊⋈↕⊢⍟⊣¬!|≡≢/≥⟜≠=⊸≥⊐⊘⊒◶⊑><⌊⌈√⁼⋆+-×÷)⋄# BQN doesn't have keywords but primitive symbols are reserved. It's ...

posted 4y ago by Razetime‭  ·  edited 4y ago by Razetime‭

Answer
60%
+1 −0
Challenges Determine whether an integer is square-free

BQN, 13 bytesSBCS ∧´0≠⊢|˜·×˜2+↕ Run online! A train submission. It's 2 bytes shorter than the lambda version {∧´0≠𝕩|˜×˜2+↕𝕩}, due to omitting curly braces. The idea is similar to ruby: ran...

posted 4y ago by Razetime‭

Answer
60%
+1 −0
Challenges Stairs? Stairs! Stairs.

Stax, 8 bytes Ç▐GcΦ≡◘¶ Run and debug it Uses spaces as the staircase fill.

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Charcoal, 7 bytes GH↑→↓N# Try it online! Link is to verbose version of code. PolygonHollow exactly fits this challenge. Prints a polygon with sides in x, all with length y, and the z used ...

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Make $2 + 2 = 5$

Husk, 7 bytes +±Λ=2¹Σ Try it online! Input as a list.

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Reduce over the range [1..n]

BQN, 8 bytes {𝔽´1+↕𝕩} Try it! basic fold builtin version. Use as a dyadic 1-modifier. Longer than APL since evaluated output is shorter than using first class functions. A more fun recursive...

posted 5y ago by Razetime‭  ·  edited 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Multiply complex numbers.

Ruby, 35 bytes ->a{a.split.map{eval _1}.reduce :*} Try it online! Right tool for the job, I suppose. uses ruby 2.7+ features, so tio link will look different.

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Meta Leaderboard bug: recognizing inline code blocks

There's a small problem with the leaderboard: It seems to be recognizing the first <code> block in the answer rather than the first <pre><code> block in the answer. The byte co...

0 answers  ·  posted 5y ago by Razetime‭  ·  edited 5y ago by Monica Cellio‭

Question bug discussion status-completed
60%
+1 −0
Challenges Shuffle a subset of a list

APL(Dyalog Unicode), 13 bytes SBCS {⍵[?⍨≢⍵]}@⎕⊢⎕ Try it on APLgolf! A tradfn submission which takes both lists on STDIN, second input is 1-indexed.

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Evens or Odds - you know this one

MAWP, 8 bytes @!2P2WA: Try it! 1 for odd and zero for even. mawp doesn't have modulus, so it floor divides by 2, multiplies by 2 and subtracts from the input.

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Really Cool Numbers

Husk, 9 bytes ΛöS=⌊AhḊḊ Try it online! or Verify all testcases returns number of divisors + 1 for true and 0 for false.

posted 5y ago by Razetime‭  ·  edited 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Beaver Code Decryption

APL(Dyalog Extended), 32 bytes SBCS {1=≢⍵:⍵⋄0~⍨,⍉↑∇¨↓2 ¯1⍴⍵,0/⍨2|≢⍵} Try it on APLgolf! A dfn submission which takes a string as input. I thought this would be much shorter, but it's only a s...

posted 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Beaver Code Decryption

Husk, 8 bytes ΣTm?I₀ε½ Try it online! It's jelly but reversed. 1 byte lesser due to a single byte halve.

posted 5y ago by Razetime‭  ·  edited 5y ago by Razetime‭

Answer
60%
+1 −0
Sandbox The Pell Numbers[FINALIZED]

Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: $P_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\2P_{n-1}+P_{n-2...

posted 5y ago by Razetime‭  ·  edited 5y ago by Razetime‭

60%
+1 −0
Sandbox Write a Deadfish Interpreter[FINALIZED]

A rewrite of this question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following commands: ...

posted 5y ago by Razetime‭  ·  edited 3y ago by trichoplax‭

60%
+1 −0
Challenges The Camelot Wheel

APL (Dyalog Unicode), 110 67 bytes {(⍕((f⊖⍪'AEBFCGDAEBFD'),r⌽12↑¯6↑5⍴'-')⍳2↑⍵),⎕a⌷⍨1+0≠f←¯3+r←3×'i'∊⍵} -43 bytes from dzaima. Requires input exactly as shown in the diagram. A bit fiddly with...

posted 5y ago by Razetime‭  ·  edited 5y ago by Razetime‭

Answer
60%
+1 −0
Challenges Longest Increasing Subsequence

Husk, 10 bytes L►LfΛo<0-Ṗ Try it online! Explanation L►LfΛo<0-Ṗ Ṗ power set of input f get elements which match the following: Λo - all pairwise difference...

posted 6y ago by Razetime‭  ·  edited 6y ago by Razetime‭

Answer
60%
+1 −0
Challenges Tile pyramids on top of each other!

Canvas, 9 7 bytes H/×║∔}r Try it here! Explanation H/×║+}r H } push empty art and start a loop from 1..n /× repeat '/' i times ║ palindromize horizontally(no overlap) ...

posted 6y ago by Razetime‭  ·  edited 6y ago by Razetime‭

Answer
60%
+1 −0
Sandbox Golf me a polygonal loader

Given three positive integers as input, animate an ascii-art polygonal loading symbol on the screen. Intro Using the first input $n$, Take one the following regular polygons: ...

posted 6y ago by Razetime‭  ·  edited 6y ago by Razetime‭

60%
+1 −0
Sandbox Towering Cistercian representation [FINALIZED]

Inspired by this video. Given a positive integer, draw its Cistercian representation as ascii art. The Challenge Cistercian numerals are a decimal-based number representation system which use ...

posted 6y ago by Razetime‭  ·  edited 6y ago by Razetime‭

60%
+1 −0
Sandbox Catch the fruit

Implement a osu!catch style game. Introduction osu!catch is a rhythm game where the player moves a "basket" to catch "fruits" falling from the top of the screen to the beat of a song. Think pong,...

posted 6y ago by Razetime‭

57%
+2 −1
Meta Answering challenges with languages newer than the challenge

Languages made specifically for a challenge after it was published This is the general problem with allowing languages newer than the challenge. This is already considered a standard loophole, and...

posted 5y ago by Razetime‭  ·  edited 5y ago by Razetime‭

Answer
50%
+0 −0
Challenges Encode with ROT13.5

Stax, 15 bytes ⌐♪aù¢φσX▀┼╜°«↕j Run and debug it

posted 4y ago by Razetime‭

Answer
50%
+0 −0
Challenges The holeyest base

Ruby, 77 bytes ->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}} Attempt This Online!

posted 4y ago by Razetime‭  ·  edited 4y ago by Razetime‭

Answer