2022 Developer Survey is open! Take survey.

New answers tagged

0 votes

Random Pixels Image Compression

Yabasic, 196 bytes Program that takes input \$n\$ from STDIN and outputs to a 'grafic' window. ...
user avatar
0 votes

Random Pixels Image Compression

Excel VBA, 145 bytes An anonymous immediate window function that takes input from [A1] and outputs to the active worksheet. Clear input on execution. ...
user avatar
0 votes

Draw the Swiss Flag

Applesoft BASIC, 144 bytes ...
user avatar
  • 151
1 vote

Plot a centered circle

Applesoft BASIC, 106 bytes 0INPUTR 1HGR 2HCOLOR=3 3D=0 4HPLOTR*COS(D)+140,R*SIN(D)+96TOR*COS(D+.1)+140,R*SIN(D+.1)+96 5D=D+0.1 6GOTO4
user avatar
  • 151
2 votes

Draw the Archimedean Spiral

BQN, 50 bytesSBCS (•math.Sin•Plot○(⊢×↕∘≠)•math.Cos)-2×π×999⥊99÷˜↕100 Run online! The JS version of BQN has a plotting builtin, which I used for the same rosetta ...
user avatar
  • 25.2k
1 vote

Draw the Archimedean Spiral

Applesoft BASIC, 73 bytes 0GR 1COLOR=7 2INPUTR 3I=0 4PLOTCOS(I)*I*R+20,SIN(I)*I*R+20 5I=I+.1 6GOTO4
user avatar
  • 151
2 votes

Draw the Archimedean Spiral

R, 42 bytes* function(a,x=0:6e3/1e3)plot(a*x*pi*1i^x/2) Try it at rdrr.io Calculates the the points of the spiral as the real and imaginary parts of complex ...
user avatar
2 votes

Random Pixels Image Compression

Wolfram Language (Mathematica), 93 bytes Image/@NestList[BlockMap[Boole[#~Total~2+r[]>2]&,#,{2,2}]&,r=RandomInteger;1~r~{#,#},Log2@#]& Try it online!...
user avatar
  • 32.8k
2 votes

Random Pixels Image Compression

J, 91 bytes load'viewmat' [:viewmat[:,.~/[:>:&>(,:~2 2)0:`(?@2)`1:@.(1+_2*@++/@,);._3&.:>^:a:[:<,~?@$2: Try it online! Output from the above is ...
user avatar
  • 26.5k
6 votes

Graphical Hello World

Minecraft Command Blocks, 47 bytes summon cow ~ ~ ~ {CustomName:'"Hello, world!"'} Spawns a cow with the name ...
user avatar
  • 409
0 votes

Graphical Hello World

PHP (8.1), 20 bytes echo'Hello, world!';
user avatar
0 votes

Graphical Hello World

JavaScript (ES6), 22 bytes alert('Hello, world!') This is an example for my question.
user avatar
7 votes

Draw the Archimedean Spiral

Minecraft Command Blocks, 599 bytes Commands Left column (bottom block 0, 4, -2) ...
user avatar
  • 409
2 votes

Draw the Archimedean Spiral

MATL, 13 bytes 9W:9/tJ*Ze*XG Try it at MATL online! Explanation ...
user avatar
  • 99.3k
3 votes

Random Pixels Image Compression

JavaScript (browser), 334 bytes ...
user avatar
  • 142k
3 votes

Draw the Archimedean Spiral

R, 49 bytes function(a)plot(cos(t<-0:9e3/1e3)*t*a,sin(t)*t*a) Try it on rdrr.io!
user avatar
  • 10.8k
2 votes

Draw the Archimedean Spiral

SVG(HTML5) + JavaScript (ES6), 77 76 + 96 = 172 bytes ...
user avatar
  • 142k
5 votes

Draw the Archimedean Spiral

GFA-Basic 3.51 (Atari ST), 68 bytes A manually edited listing in .LST format. All lines end with CR, including the last one. ...
user avatar
  • 166k
3 votes

Draw the Archimedean Spiral

J, 28 bytes plot@(**r.@o.@])(%~8*i.)@1e5 Try it online! a=1 a=2
user avatar
  • 26.5k
7 votes

Draw the Archimedean Spiral

Desmos, 14 bytes r=\ans_1\theta Well... Try it on Desmos!
user avatar
  • 3,916
2 votes

Draw the Archimedean Spiral

SageMath, 69 68 bytes lambda a,t=var('t'):parametric_plot((a*t*cos(t),a*t*sin(t)),(t,0,9)) Try it online! Saved a byte thanks to Seggan!!! Original graph using ...
user avatar
  • 17.8k
2 votes

Draw the Archimedean Spiral

Excel & VBA, 144 bytes ...
user avatar
  • 3,146
3 votes

Draw the Archimedean Spiral

Wolfram Language (Mathematica), 22 bytes PolarPlot[y#,{y,0,7}]& Try it online! I picked 7 for the plot range because it's a one-digit number that is close to \$...
user avatar
  • 1,250
2 votes

Random Pixels Image Compression

C (GCC), 296 bytes ...
user avatar
  • 1,192
0 votes

Draw the EU Estimated Sign

C (gcc), 251 248 bytes -3 bytes thanks to @ceilingcat ...
user avatar
  • 1,192
3 votes

Draw the Ukrainian Flag

Perl 5, 36 bytes $#a=78;print".[${_}m@a "x13for 44,43 Try it online! Outputs using ANSI escape sequences.
user avatar
1 vote

Draw the EU Estimated Sign

PostScript, 280 140 bytes Now smaller, with binary tokens and less precision! ...
user avatar
1 vote

Draw the national flag of France

Applesoft BASIC, 122 bytes 1GR 2COLOR=2 3M=13 4X=-1 5X=X+1 6VLIN0,25ATX 7IFX<M GOTO5 8IFM==26GOTO12 9COLOR=15 10M=26 11GOTO5 12COLOR=1 13M=39 14GOTO5
user avatar
  • 151
0 votes

Draw the flag of Bangladesh

Perl 5 + -M5.10.0, 82 bytes say"P6 300 180 255",map$=>((135-$_%300)**2+(90-$_/300)**2)**.5?".*A":".jN",0..54e3 Try it online!...
user avatar
1 vote

Draw the ☣ (Biohazard Symbol)

PostScript, 198 106 bytes ...
user avatar
0 votes

Plot a centered circle

Robocompass, 16 bytes arc(0,0,a,0,360) Where you have to define a before that as input.
user avatar
  • 519
0 votes

Plot a centered circle

Desmos, 3 bytes r=1 Simply entering r, in my concern, doesn't work, but entering r=0 ...
user avatar
  • 519
2 votes

Plot a centered circle

Desmos, 10 12 bytes xx+yy=rr r=1 Desmos it
user avatar
  • 519
0 votes

Draw the flag of Bangladesh

Desmos, 66 bytes This: r=rgb(244,42,65) g=rgb(0,106,78) -9≤x≤11\left\{yy≤36\right\} xx+yy≤16 This is longer than the other one, but that other one didn't work, as <...
user avatar
  • 519
3 votes

Draw the Ukrainian Flag

Applesoft Basic, 88 bytes 1Y=0 2M=13 3GR 4COLOR=2 5HLIN0,38ATY 6Y=Y+1 7IFY<M GOTO5 8COLOR=13 9M=26 10Y=13 11GOTO5 Kind of cheating because it only is 39:26. I ...
user avatar
  • 151
1 vote

Draw the Ionising Radiation Hazard Symbol

PostScript, 83 81 43 41 bytes ...
user avatar
1 vote

Draw the Ionising Radiation Hazard Symbol

QBasic, 176 bytes ...
user avatar
  • 31.8k
0 votes

Draw the Swiss Flag

C (GCC), 133 bytes ...
user avatar
  • 1,192
1 vote

Draw the Swiss Flag

Desmos, 90 69 bytes c=hsv(0,[1,0,0],1) [0,6,13]<=x<=[32,26,19]\{[0,13,6]<=y<=[32,19,26]\} Try it on Desmos! -21 bytes thanks to Aiden Chow
user avatar
  • 3,916
0 votes

Draw the national flag of Iceland

Desmos, 150 bytes ...
user avatar
  • 3,916
1 vote

Draw the flag of Bangladesh

Desmos, 64 61 bytes r=rgb(244,42,65) g=rgb(0,106,78) -9<=x<=11\{yy<36\} xx+yy<=16 Try it on Desmos! -3 bytes thanks to Aiden Chow
user avatar
  • 3,916
1 vote

Draw the Ionising Radiation Hazard Symbol

Desmos, 60 bytes w=hsv(0,0,1) r<5\{[0,3,6]40<\theta<[1,3,5]60\} xx+yy<9/4 r<1 Try it on Desmos This is the version without scaling, now the shortest ...
user avatar
  • 2,497
0 votes

Draw the Ionising Radiation Hazard Symbol

Desmos, 95 bytes b<=25 polygon((6,0),(3,-6),(-3,6),(3,6),(-3,-6),(-6,0),(6,0)) b<=2.25 b<=1 c=hsv(0,0,1) b=xx+yy Try it on Desmos! Unsure if ...
user avatar
  • 3,916
1 vote

Translate Text into Matoran

C (GCC), 871 bytes ...
user avatar
  • 1,192
1 vote

Draw the Ukrainian Flag

Ly, 39 bytes 99*:3*&s*:[r009r,]+[r990r,]+'Po9lf2*f3r Try it online! This code pushes RGB values compatible with PPM ASCII formatted image into the stack, then ...
user avatar
  • 1,859
6 votes

Draw the ☣ (Biohazard Symbol)

Desmos, 126 125 bytes ...
user avatar
  • 15.9k
0 votes

Display random colored pixels

PostScript, 151 bytes ...
user avatar
1 vote

Draw New Posts' Profile!

C (gcc), 295 bytes shorter version thanks to @ceilingcat ...
user avatar
  • 1,192
0 votes

Draw the national flag of Iceland

pdfTeX, 108 bytes \def~{ w 9 0 m 9 18 l s 0 9 m 25 9 l s }\pdfliteral{0 .28 .88 rg 0 0 25 18 re f 1 G 4~.84 .16 .16 RG 2~}\bye
user avatar
  • 181
1 vote

Draw the flag of Bangladesh

Javascript + HTML, 167 Javascript: 154, HTML: 13 ...
user avatar

Top 50 recent answers are included