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 Moshi‭

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

Python 3, 47 42 40 bytes -2 bytes thanks to bastolski lambda n:'#'*n+('\n#'+' '*(n-2)+'#')*~-n Try it online! Python's string multiplication is really useful.

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

Answer
60%
+1 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

Python 3, 325 322 bytes -3 bytes thanks to steffan153‭! from base64 import* n=int.from_bytes(b85decode('8C^#Z9Uor=^}*nk`yLA}A<z=aTm_V+z!I{Y1+v7z89f>WmC>M4TN(sPp`fvySOeqafPpzk0!*=hK2{h9D...

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Answer
60%
+1 −0
Challenges Looping counter

JavaScript (Node.js), 31 bytes for(i='';;console.log(i+='*')); Try it online!

posted 2y ago by Moshi‭

Answer
60%
+1 −0
Q&A Up to date JavaScript Try-It-Online

Try it online doesn't support the latest JavaScript features such as optional chaining or null coalescence, which are very useful character-saving operators. Is there another site like TIO, but whi...

1 answer  ·  posted 2y ago by Moshi‭  ·  last activity 2y ago by trichoplax‭

Question try-it-online
60%
+1 −0
Challenges Evaluate a single variable polynomial equation

Python 3, 46 bytes lambda a,x:sum(c*x**i for i,c in enumerate(a)) Try it online!

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Expand a polynomial

JavaScript (Node.js), 60 bytes f=([x,...r],y)=>x?[0,...y=f(r)].map((v,i)=>v-x*(y[i]|0)):[1] Try it online!

posted 3y ago by Moshi‭  ·  edited 29d ago by Moshi‭

Answer
60%
+1 −0
Challenges "Hello, {name}!"

Sclipting, (UTF-16) 14 bytes 낆녬닆묬글⑴긐

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Make my value binary

Sclipting, (UTF-16) 14 bytes 要감啃終丟併反 Explanation: Push input 要 While the top number is non-zero 감啃 Shift the top number by 1 bit and push both the bit and shifted result 終 End lo...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Just the vowels please

Sclipting, (UTF-16) 22 bytes 놵멡뉖땯더굅낔뭕뇐虛移 Nothing complicated, just replaces the regex [^aeiouAEIOU] with the empty string.

posted 2y ago by Moshi‭

Answer
60%
+1 −0
Sandbox Generalized Sort

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

60%
+1 −0
Challenges In The Jailhouse Now

Sclipting, (UTF-16) 80 bytes 갰減먩놔 먩놦①復먩놗겮꺕똀 먩놬①復①增疊먩놣겮꺕똀會먩놣겮꺕떠 먩놩⑴復먩놝 Explanation Input n pushed on stack 갰減 Subtract 3 먩놔 "╔" 먩놦 "╦" ①復 String of above repeat...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges A chunk of symbols is a calculation

JavaScript (Node.js), 148 bytes s=>s?eval(s.replace(/([^()])\1*/g,(m,g)=>(g=='!'?'+':g)+m.length).replace(/\(/g,'*(').replace(/-(\d|\(.+?\))\^(\d+)/g,(m,g,h)=>'-('+g+'**'+h+')')):0 Abu...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges 99 Shortened Bottles of Beer

JavaScript (Node.js), 228 224 bytes -4 bytes thanks to Hakerh400 (b=n=>`${n} bottle${n-1?'s':''} of beer`,w=' on the wall')=>[...Array(99)].map((_,i)=>`${b(i=99-i)}${w}, ${b(i)}. `+(--i...

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

Answer
60%
+1 −0
Challenges 99 Shortened Bottles of Beer

Sclipting, (UTF-16) 238 bytes 눰 감下❶貶下標⓶긆깯덇끬뉗꼠닶눠눦녥댠❷감侔是검摧終併終❷긆뭮긇끨뉒걷눖롬 껂밀⓹껠뙔눖띥긆뭮뉒걤닷덮긆굮뉂거눗꽳긆땴긆굲닷녮뉂렠⓺❺껠똊終棄棄껠뙇닲건닲건늆넠댷끯댦넠눖멤긆깵뎒걳닶륥긆륯댦넬긃딹긆깯덇끬뉗꼠닶눠눦녥댢걯닢건늆넠덶구닂밎 Explanation 눰 감下 For n from 99 down to 1 ...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges It's Hip to be Square

Sclipting, (UTF-16) 8 bytes 根❶圜同 Takes the square root, pushes a copy, rounds the copy, and compares. Basically, checks that the square root is an integer.

posted 3y ago by Moshi‭  ·  last activity 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges 1, 2, Fizz, 4, Buzz!

Sclipting, (UTF-16) 62 bytes 감 뉀上標❷갰剩虛끦땺뎠嗎❸걐剩虛뀧녺뎠嗎併梴是⓶終丟終并겠會

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Cumulative Counts

JavaScript (Node.js), 34 29 26 bytes -5 bytes thanks to Shaggy's suggestion on a similar challenge -3 bytes again thanks to Shaggy! a=>a.map(d=v=>d[v]=-~d[v]) Try it online!

posted 3y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Answer
60%
+1 −0
Challenges Plain black webpage

HTML, 25 bytes <style>*{background:#000} Not really sure if this is a legal solution, but technically you can open it in your browser...

posted 10mo ago by Moshi‭

Answer
50%
+0 −0
Challenges "Hello, World!"

Sclipting, (UTF-16) 18 bytes 낆녬닆묬긅덯댦롤긐 Since it hasn't been added yet.

posted 3y ago by Moshi‭

Answer
50%
+0 −0
Challenges Mediocre pop count

Python, 89 bytes lambda l,g=lambda c:ord(c).bit_count():[i for i in l if min(map(g,l))<g(i)<max(map(g,l))] Attempt This Online!

posted 2y ago by Moshi‭

Answer
50%
+0 −0
Challenges Make a frequency table (histogram)

JavaScript (Node.js), 38 32 bytes -6 bytes thanks to Shaggy! a=>a.map(v=>d[v]=-~d[v],d={})&&d Try it online! Basically just this but returning the result

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

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

Japt, 6 bytes -1 byte thanks to Shaggy! k ä¦ e Try it First time doing Japt so this is probably pretty bad. Just factorizes and checks that there are no duplicate factors.

posted 3y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Answer
50%
+0 −0
Challenges Shape of an array

JavaScript (Node.js), 39 bytes Returns dimensions from innermost to outermost f=a=>a?.pop?f(a[0]).concat(a.length):[] JavaScript (Node.js), 41 bytes Returns dimensions from outermost to ...

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

Answer
50%
+1 −1
Meta Default Rules: Extensions

Implementation defines the language, so if you use extensions to a language, you should add + ... extensions to the header. E.g. for a C post using gcc extensions, the header begin with # C (gcc...

posted 3y ago by Moshi‭

Answer
50%
+0 −0
Challenges Prime Difference

JavaScript (Node.js), 81 bytes d=(p,i=2)=>i<p?!(p%i)||d(p,i+1):0 f=(n,a=2,p=a+1)=>d(p)?f(n,a,p+1):p-a<n?f(n,p):a Try it online! Explanation: d is a helper function that returns t...

posted 4y ago by Moshi‭

Answer