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 Marshall Lochbaum‭

20 posts
80%
+6 −0
Challenges Diagonalized alphabet

BQN, 18 bytesSBCS 'A'-¬⊸⌊2×13-˜⌜○↕14 Run online! This solution computes a table of c-r, where r is the row number and c is the column number, so that the first row is 0 1 2… and the first colu...

posted 3y ago by Marshall Lochbaum‭

Answer
80%
+6 −0
Challenges Juggler sequences

BQN, 17 bytesSBCS {𝕩∾1𝕊⍟≠⌊𝕩⋆2|𝕩+÷2} Run online! BQN primitives alone can't express unbounded iteration, so this must be a recursive block function. {𝕩∾1𝕊⍟≠⌊𝕩⋆2|𝕩+÷2} # Function 𝕊 taking argu...

posted 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Beaver Code Decryption

BQN, 24 bytesSBCS {g⊔⁼𝕊¨⍟(1<≠)𝕩⊔˜∧g←2|↕≠𝕩} Run online! {g⊔⁼𝕊¨⍟(1<≠)𝕩⊔˜∧g←2|↕≠𝕩} { } # Block function 𝕊 with argument 𝕩 ≠𝕩 # Length of 𝕩 ...

posted 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Create an Alphabet Diamond

BQN, 19 bytesSBCS ' '+32⊸<⊸×+⌜˜⌽⊸⌊↕59 Run online! This uses the whitespace allowance, padding by four spaces on all sides to make the arithmetic work better. It can be adjusted by replacing...

posted 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Output 256 in many different ways

BQN, 14 solutions (SBCS) Run online! This link shows the result of each expression and a table of character intersections. Each expression intersects with itself only, giving a diagonal matrix. Th...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
77%
+5 −0
Challenges Make my number a set

BQN, 7 6 bytesSBCS ≢↑∘⊢´↕ Run online! The less-golfed version {↑⍟𝕩⟨⟩} is more readable: it applies Prefixes (↑) the given number of times to the empty list ⟨⟩ and… that's it. (Suffixes also wo...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
75%
+4 −0
Challenges Obligatory Quine Challenge

BQN, 20 bytesSBCS ∾2/0‿8⊏↓"∾2/0‿8⊏↓""" Run online! BQN's strings escape double quotes by doubling them, so that the string used to start with only contains a single quote, although the output ...

posted 3y ago by Marshall Lochbaum‭

Answer
75%
+4 −0
Challenges Merge two strings

BQN, 18 bytesSBCS {⊑(⊑𝕨⊸⍷)¨⊸/∾⟜𝕩¨↑𝕨} Run online! A direct translation of Razetime's APL solution (my attempted improvement ⊣∾{⊢´/𝕨⊸«⊸≡¨↑𝕩}↓⊢ turns out to be not at all correct). The BQN solut...

posted 3y ago by Marshall Lochbaum‭

Answer
71%
+3 −0
Challenges Chequer checker

BQN, 32 bytesSBCS Run online! {∨´∾8(⥊(⊐⌾⥊𝕩)⍷·≠⌜˜2|/∘⥊)¨1+↕≠⥊𝕩} Brute force: tests against all boards up to the number of characters in 𝕩 using Find (⍷). Using the longest dimension is faster b...

posted 1y ago by Marshall Lochbaum‭  ·  edited 1y ago by Marshall Lochbaum‭

Answer
71%
+3 −0
Meta Leaderboards are live

Seems to be an issue with the ordering (across languages) when "Group by language" is set. When I first load the page, they are ordered with the most recent post first. If I then uncheck "Group by ...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
71%
+3 −0
Challenges Are they abundant, deficient or perfect?

BQN, 21 bytesSBCS (¬·×-+´·/0=↕⊸|)¨⊸⊔1+↕ Run online! Mostly one big train used to find the appropriate group for each number, to be used with Group (⊔). The combining functions in a train norma...

posted 3y ago by Marshall Lochbaum‭

Answer
71%
+3 −0
Challenges Evaluation order of an APL n-train

BQN, 8 bytesSBCS ⍒↕+2|⊢+↕ Run online! The solution itself is an 8-train, so its evaluation order is given by the sequence 7 5 6 3 4 1 2 0: first the rightmost ↕, then the ⊢, then the + between...

posted 3y ago by Marshall Lochbaum‭

Answer
71%
+3 −0
Challenges Really Cool Numbers

BQN, 25 bytesSBCS ⌊⊸≡(/0=↕⊸|){(+´÷≠)∘𝔽¨«⟜𝔽} Run online! This expression has a complicated structure. This link uses BQN's explain feature to show the order in which everything is applied. It's...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Weave Strings Together

BQN, 8 bytesSBCS ∾⊒˜¨⊔○∾⊢ Run online! and parsing diagram The idea here is to build a list of groups, with group i containing the ith character of each string that has one, then join the group...

posted 3y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Length of a Sumac Sequence

BQN, 15 bytesSBCS {𝕨(1+⊢𝕊-)⟜𝕩⍟>0} Run online! A block function that takes $t_1$ as the left argument 𝕨 and $t_2$ as the right argument 𝕩. In BQN, 𝕊 indicates recursion on the current block ...

posted 3y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Win a War (or at least a few battles)

BQN, 44 bytesSBCS +´{(≠↑𝕨-𝔽)⊸+2↓⊑∨(≍×𝕨≥⊢)○𝔽˜⟜×⊸∾¨(<1+𝕩)×⥊↕2¨𝕩} Run online! The solution is a function that takes n as the left argument (𝕨) and A as the right argument (𝕩). k is just the le...

posted 3y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Create a Sudoku

BQN, 11 9 bytesSBCS Run online! 1⌽⍟⊢⍋3|↕9 The result is a length 9 list of lists using the numbers 0 to 8. The solution is based on the 3x3 transpose list 036147258, obtained with Grade Up. T...

posted 3y ago by Marshall Lochbaum‭  ·  edited 3y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Meta Leaderboards are live

Adding display:flex; align-items:center to .toc--full items centers the names and code samples vertically, which I think looks a little better.

posted 3y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Obligatory Quine Challenge

BQN, 14 bytesSBCS ∾⟜•FMT"∾⟜•FMT" Run online! Assumes •FMT will format a string by placing it in quotes, which depends on the BQN system in use. After (⟜) applies its right operand •FMT to the ...

posted 3y ago by Marshall Lochbaum‭

Answer
60%
+1 −0
Challenges Print the Great Numeric Pyramid

BQN, 33 bytesSBCS >(⌽(⊑¨55↑+˜⊸+⊔'0'+⌽⊸⌊⊸⌊)¨˜1↓↑)↕28 Run online! Minimum of barycentric coordinates placed according to a skew transformation on two of them. So, the min(i,j,27-i-j) thing pr...

posted 3y ago by Marshall Lochbaum‭

Answer