6
votes
Snake a string through a simplex
Python, 85 84 83 bytes
f=lambda s,n,l,r=1:n and[f(s,n-1,i+1,i%2*2-1)for i in range(l)[::r]][::r]or next(s)
Takes the string (s) ...
5
votes
Segments of a string, doubling in length
tinylisp 2, 46 bytes
(d F(\(S(I 1))(? S(c(] I S)(F([ I S)(* I 2)))(
Try It Online!
Ungolfed & commented
...
5
votes
Curry a C function pointer
K (ngn/k), 34 bytes
Replace each , with ))( and repeat (* for number of ...
4
votes
Curry a C function pointer
Jelly, 21 bytes
iṂœṖjċ”,⁾(*ẋƊṣ”,j“))(
A full program that accepts a string and prints the result.
Try it online!
How?
...
3
votes
Transpose a page of text
K (ngn/k), 33 bytes
{"\n"/(|&\|^:)_'+(|/#'x)$x}@"\n"\
Try it online!
{...}@"\n"\ split (...
3
votes
Curry a C function pointer
JavaScript (Node.js), 60 bytes
x=>x.replace(/\W(\w*)/g,(_,y)=>y?(s+=`)(${y})`,'(*'):s,s='')
Try it online!
-1B from Shaggy
3
votes
Curry a C function pointer
Java, 70 bytes
s->s.replace("(*","(*".repeat(s.split(",").length)).replace(",","))(")
Try it online.
...
2
votes
Geobitsian Language
Perl 5 + -p, 36 bytes
%a=<>=~/(\S)(\S*)/g;s/./$&$a{lc$&}/g
Try it online!
Explanation
The hash ...
2
votes
2
votes
2
votes
bROKEN cAPSLOCK kEY fIASCO
Vyxal, 14 bytes
‛ß₌£Nƛ⇩¥h=[N&Ǔ
Try it Online! Outputs as a char list, s flag formats into string.
...
2
votes
Slowly turn a string into another
Java, 152 143 bytes
Starting with the initial java-solution by Master_ex i improved it by merging the two loops into one:
...
2
votes
Slowly turn a string into another
K (ngn/k), 14 bytes
{(|1_,\x),,\y}
Try it online!
,\y generate prefixes of second input
...
2
votes
2
votes
2
votes
Recreate the ASCII-table as an ASCII-table
Java (JDK), 192 194 200 bytes
-6 bytes with the help of Khuldraeseth na'Barya
-2 bytes with more refactoring (column separators conditioned instead of concatenated, and ...
2
votes
Easier communication means faster coding means fewer coders means …
Vyxal S, 31 bytes
`∵ʀ†⌊×İ∞Ṙ⟩₆×İ‛⋏₁Ṫ□Ẋ×İ``.×+`ẎɾÞċ
Try it Online!
...
2
votes
Find the longest word in an array
UiuaSBCS, 9 7 bytes
⊏⊢⍖≡◇⧻.
Try it here!
Both the input and output is □ boxed. Does not work on empty arrays.
Explanation
...
2
votes
How much code would a codegolf golf if a codegolf could golf code?
Uiua, 52 50 bytes
$"How much _ would a __ _ if a _ could _ _?"⊃∩.⊃⊂:
Try it: Uiua pad
Explanation: Each _ in the <...
2
votes
Curry a C function pointer
Retina 0.8.2, 17 bytes
+`(\).+),
(*$1))(
Try it online! Link includes test cases. Explanation: Repeatedly replace each comma in turn from right to left with ...
2
votes
Snake a string through a simplex
Charcoal, 83 bytes
≔⪪⮌S¹θ≔EN¹ηFNUMη…η⊕λ≔⟦⟦⟧X⊟η¹⟧η⊞υ⟦⟦⟧η⟧FυFLι«≔§ικζ¿№ζ¹F⁺²κUMζ⎇λ§⮌ζν∧μ⊟θ⊞υ⎇﹪κ²ζ⮌ζ»⭆¹⊟η
Try it online! Link is to verbose version of code. Takes ...
1
vote
Geobitsian Language
Uiua, 38 bytes
Try it online!
/◇⊂⨬⋅∘(⊡⊙◌)⊸⊃∈(⊗:)⊙:⊙¤⊸≡◇⊢⊂⊸⍚⍜⊢⌵⊜□⊸≠@
This can probably be golfed more, but it's proving tough.
Explanation
...
1
vote
Slowly turn a string into another
Arturo, 61 59 bytes
$[a b]->drop map..size a 0-size b'x[?0>x[0-x b][x+2a]take]2
Try it!
1
vote
Slowly turn a string into another
Pyth, 11 bytes
j+_thA._MQH
Try it online!
I think that there is a better way of solving this challenge in Pyth. For now, I am posting this 11 byte solution.
...
1
vote
Geobitsian Language
Scala 3, 76 bytes
w=>_.map(c=>c+(w split " "find(_(0)==c.toLower)getOrElse "a").tail).mkString
Attempt This Online!
Based on this answer ...
1
vote
1
vote
1
vote
Expand a C array
Japt -R, 41 40 39 bytes
This started out horrible, and got progressively worse over a few hours! And, just as I had it down to a byte count I was somewhat happy ...
1
vote
Expand a C array
Uiua, 69 bytes
⊂⊃(□$"_ _[_];"|⍚$"_[_] = _;"¤⋅⊙⊓⇡∘)⊙⊙(⊸⧻⊜□≥@0.)°$"_ _[] = {_};"
Try it!
1
vote
Filter out and add up
JavaScript (Node.js), 34 bytes
s=>eval(s.replace(/\D|$/g,' +')+0)
Try it online!
Like ETHproductions's answer but extra push is possible
Not work as intended ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
string × 2264code-golf × 2126
ascii-art × 212
decision-problem × 144
kolmogorov-complexity × 125
parsing × 124
number × 103
code-challenge × 71
natural-language × 67
math × 61
random × 61
balanced-string × 59
array × 55
restricted-source × 48
grid × 45
subsequence × 41
sorting × 40
sequence × 39
alphabet × 39
arithmetic × 38
permutations × 37
source-layout × 36
date × 34
counting × 32
palindrome × 31