| Bytes | Lang | Time | Link |
|---|---|---|---|
| 033 | tinylisp 2 | 230321T161212Z | DLosc |
| 035 | Swift 6 | 250724T002442Z | macOSist |
| 012 | Uiua | 240808T143512Z | ErikDaPa |
| 6368 | Prolog SWIPl | 160920T141412Z | SQB |
| 032 | X86‐64/Linux Machine Code | 230928T203306Z | Noah |
| 026 | Red | 241122T091237Z | Galen Iv |
| 011 | Joeasus | 241122T063848Z | ATaco |
| 033 | Google Sheets | 241011T143256Z | z.. |
| 071 | Mindustry | 241011T082044Z | Dornteuf |
| 043 | Acc!! | 240518T054232Z | engineer |
| 170 | Among Us | 240730T053620Z | engineer |
| nan | 240602T233048Z | RARE Kpo | |
| 027 | Arturo | 240530T130535Z | chunes |
| 012 | +Output | 240519T020345Z | Evylah |
| 033 | Civet | 240518T232000Z | Bbrk24 |
| 045 | GNU nroff | 221019T111341Z | 鳴神裁四点一号 |
| 048 | SQL Oracle | 240409T202703Z | Ditto |
| 022 | YASEPL | 240327T172254Z | madeforl |
| 021 | Easyfuck | 240325T145855Z | Quadrupl |
| 005 | Vyxal 3 j | 240103T043622Z | pacman25 |
| nan | morsecco 109 | 231123T174436Z | Philippo |
| 024 | /// | 231017T104209Z | Philippo |
| 010 | Uiua | 231017T065416Z | Bubbler |
| 1260 | Nibbles | 221019T125456Z | sfieger |
| 092 | Java | 230928T163550Z | Woody |
| 035 | Trilangle | 230926T184635Z | bbrk bot |
| 071 | TypeScript's Type System | 230924T132836Z | noodle p |
| 051 | makina | 230923T185401Z | Toasty |
| 025 | TacO | 230321T215424Z | ATaco |
| 054 | Swift | 230321T192952Z | user1171 |
| 459 | Nibbles | 230321T110413Z | Dominic |
| 013 | Rattle | 210814T175015Z | d01 |
| nan | Bits | 221124T203510Z | The Thon |
| 007 | V | 160804T093243Z | DJMcMayh |
| 028 | Triangular | 170616T075627Z | Leaky Nu |
| 009 | Carrot | 170211T183347Z | user4180 |
| 011 | Brachylog | 220802T184911Z | DLosc |
| 015 | Brachylog v1 | 160809T121640Z | Fatalize |
| 014 | Knight | 220802T023202Z | Bubbler |
| 004 | Vyxal | 220711T095136Z | emanresu |
| 027 | Flobnar | 220711T033515Z | Bubbler |
| 034 | Kotlin | 220709T212414Z | wartoshi |
| 023 | Python 3 | 220709T191252Z | joyofori |
| 014 | BQN CBQN | 220707T203011Z | DLosc |
| 010 | Regenerate a | 220311T184626Z | DLosc |
| 013 | Regenerate | 220311T183830Z | DLosc |
| 023 | Python 3 | 180603T051651Z | Joseph |
| 023 | Python 3 | 160805T072905Z | niyasc |
| 023 | Python 3 | 220204T071230Z | M Virts |
| 058 | tinylisp | 170217T074648Z | DLosc |
| 049 | tinylisp | 220204T031629Z | Razetime |
| 043 | Headascii | 211006T200237Z | thejonym |
| 033 | shortC | 211210T160649Z | Alan Bag |
| 023 | APOL | 211209T140401Z | Ginger |
| 240 | Hodor | 211207T091237Z | Fmbalbue |
| 045 | Tagscript | 211007T013230Z | thejonym |
| 015 | Japt | 211201T152214Z | Alan Bag |
| 103 | KonamiCode | 211112T152404Z | Ginger |
| 071 | Aussie++ | 211029T213857Z | Bbrk24 |
| 035 | Minim | 210813T032219Z | Christia |
| 027 | Cascade | 210812T121748Z | Jo King |
| 024 | Python 3 | 211016T121137Z | Stephen |
| 011 | V vim | 211001T151543Z | user1072 |
| 016 | jq | 211007T020036Z | Sara J |
| 043 | SNOBOL4 CSNOBOL4 | 211002T071921Z | user1004 |
| 018 | Subleq 8 bit | 211001T172028Z | Axuary |
| 034 | Python 3 | 211001T155344Z | junaid A |
| 025 | Python 3 | 210916T142631Z | Alan Bag |
| 114 | CLCINTERCAL | 210916T123326Z | user1004 |
| 109 | INTERCAL | 210916T120643Z | user1004 |
| 005 | Vyxal j | 210818T135007Z | SjoerdPe |
| 023 | Python 3 | 210824T012730Z | BreadBor |
| 6435 | Commodore BASIC C64/128 | 210813T102939Z | Shaun Be |
| 040 | Elixir | 210812T082058Z | H Lynn |
| 101 | Arduino | 210814T141031Z | Bbrk24 |
| 035 | Elixir | 210813T112353Z | Dom Hast |
| 271 | Malbolge | 210813T023935Z | user1004 |
| 043 | Vyxal | 200929T074749Z | lyxal |
| 017 | Deorst | 210810T222200Z | Aaroneou |
| 105 | Yggdrasil | 210810T130749Z | Aaroneou |
| 024 | Mathematica | 210810T101338Z | user1158 |
| 013 | K ngn/k | 210810T072710Z | zoomlogo |
| 010 | 51AC8 | 210625T084811Z | zoomlogo |
| 319 | Unreadable | 210726T114703Z | ovs |
| 006 | 05AB1E | 210726T095041Z | ovs |
| 036 | GForth 36 Bytes | 210726T091747Z | user1052 |
| 031 | RAMDISP | 210621T124549Z | Pro Oder |
| 033 | PPL | 210620T073236Z | user1006 |
| 011 | yuno abandoned | 210513T191917Z | hyperneu |
| 013 | Barrel | 210514T015656Z | LorenDB |
| 014 | BRASCA | 210513T172141Z | RezNesX |
| 008 | Vyxal | 210425T171454Z | wasif |
| 018 | Duocentehexaquinquagesimal | 210414T223610Z | Makonede |
| 069 | PHP | 210412T130406Z | Dominic |
| 008 | vim | 210411T164722Z | Ray |
| 031 | Twue | 210411T023628Z | Conor O& |
| 040 | ConTeXt | 210227T121120Z | J. А. de |
| 039 | VBScript | 210409T170419Z | wasif |
| 008 | Excel | 210326T210137Z | Carl Col |
| 030 | Factor | 210326T164727Z | wasif |
| 029 | GFortran | 210315T012037Z | roblogic |
| 050 | CSASM v2.3.0.1 | 210324T011800Z | absolute |
| 007 | 05AB1E | 200924T015918Z | Makonede |
| 035 | swift 5 | 210313T224413Z | Jason Mo |
| 039 | R | 210315T094432Z | Nick B |
| 035 | Elixir | 210315T093941Z | Kirill L |
| 017 | Perl 5 | 210313T171611Z | Donat |
| 035 | Clojure | 210314T203213Z | Kirill L |
| 037 | Java JDK | 210313T170750Z | Donat |
| 023 | Python 3 | 210313T170226Z | Donat |
| 031 | JavaScript V8 | 210313T170029Z | Donat |
| 076 | vJASS Warcraft 3 | 200924T133828Z | ネルマン |
| 040 | naz | 200120T213159Z | sporebal |
| 089 | Templates Considered Harmful | 210304T081922Z | Zack C. |
| 042 | Batch | 210303T091120Z | wasif |
| 023 | Python | 210301T133035Z | user1008 |
| 017 | BRASCA | 210122T152300Z | SjoerdPe |
| 038 | Whispers v3 | 210227T062818Z | Michael |
| 046 | Java | 210227T041452Z | Unmitiga |
| 037 | x86_16 machine code | 210227T034136Z | Febriyan |
| 024 | Python 3 | 210123T045931Z | Berken T |
| 031 | Lua | 210123T044556Z | Benrob03 |
| 041 | C gcc | 210119T034033Z | anotherO |
| 048 | Java 11 | 210119T185804Z | user1004 |
| 019 | Zsh F | 210119T194313Z | pxeger |
| 014 | GNU nano | 210119T063345Z | EasyasPi |
| 067 | Python 3 | 201201T200306Z | Miles C. |
| 023 | Brian & Chuck | 201104T015846Z | 2014MELO |
| 122 | Assembly NASM | 201014T135626Z | Petr Fie |
| 012 | Bound | 201014T154345Z | HoofedEa |
| 013 | Notepad++ | 201014T021126Z | DLosc |
| 008 | CJam | 201014T064357Z | Dion |
| 017 | x8616 machine code | 200924T131857Z | 640KB |
| 081 | Marbelous | 200924T125538Z | jonatjan |
| 026 | Cubix | 161128T220201Z | MickyT |
| 015 | Check | 170615T010817Z | Esolangi |
| 004 | Charcoal | 170217T072720Z | DLosc |
| 009 | JAISBaL 3.0.1 | 160805T023025Z | Socratic |
| 018 | Braingolf | 170608T080834Z | Mayube |
| 1410 | PyMin | 160808T004625Z | acrolith |
| 020 | Add++ | 200923T235741Z | lyxal |
| 008 | Bubblegum | 200924T000428Z | Sisyphus |
| 076 | Flurry | 200923T230512Z | Esolangi |
| 1940 | Mornington Crescent | 200917T093327Z | Dorian |
| 023 | MAWP | 200812T181734Z | Dion |
| 010 | GolfScript | 200915T190432Z | 2014MELO |
| 030 | Desmos | 200912T043929Z | Ethan Ch |
| 039 | Rust | 200911T180700Z | TehPers |
| 035 | Rockstar | 200909T171007Z | Shaggy |
| 064 | Rutger | 200909T170421Z | caird co |
| 005 | Pip l | 200904T031803Z | DLosc |
| 185 | INTERCAL | 200817T072850Z | mindover |
| 052 | JavaScript V8 | 200817T084200Z | Yaroslav |
| 048 | 1+ | 200812T134559Z | Twilight |
| 009 | Keg | 200817T050704Z | lyxal |
| 006 | Integral | 200812T222728Z | user9649 |
| 026 | MAWP | 200812T123710Z | Razetime |
| 109 | CSS | 190919T204955Z | Kamil Ki |
| 079 | Set | 200607T040940Z | PkmnQ |
| 035 | Plain TeX | 200602T151902Z | Joe85AC |
| 465 | Scratch 3.0 | 200130T215613Z | lyxal |
| 074 | W d | 200122T083757Z | user8505 |
| 009 | Husk | 200129T073134Z | user8505 |
| 015 | Ruby | 200121T134634Z | IMP1 |
| 049 | Rust | 200122T125211Z | InxaneNi |
| 012 | JAPT | 191210T132258Z | Elijah S |
| 011 | APL Dyalog Classic | 191210T130245Z | user8505 |
| 026 | PHP | 191015T025210Z | Night2 |
| 023 | Python 3 | 191015T015246Z | Matthew |
| 010 | Keg | 191014T133429Z | user8505 |
| 007 | MathGolf | 191014T132116Z | user8505 |
| 034 | Forth gforth | 180130T143020Z | reffu |
| 018 | Perl 5 | 190919T224019Z | rpGYNay0 |
| 066 | Perl 5 | 170617T212323Z | xyz123 |
| 011 | Excel VBA | 170903T181647Z | Taylor R |
| 053 | C# .NET Core | 190219T224437Z | Authenti |
| 009 | Gol><> | 190219T194231Z | KrystosT |
| 033 | R | 190219T201654Z | Chthonyx |
| 004 | Stax | 190219T192709Z | recursiv |
| 008 | Premier | 190219T185924Z | Conor O& |
| 057 | Pascal FPC | 180929T153616Z | AlexRace |
| 145 | A0A0 | 180929T132440Z | user8317 |
| 023 | Julia 1.0 | 180928T185838Z | gggg |
| 077 | ESOPUNK | 180928T173423Z | SIGSTACK |
| 032 | MBASIC | 180920T132845Z | wooshiny |
| 012 | q | 180920T151810Z | Thaufeki |
| 387 | Shakespeare Programming Language | 180920T150607Z | JosiahRy |
| 185 | ORK | 180920T145631Z | JosiahRy |
| 006 | MathGolf | 180920T141924Z | maxb |
| 018 | Ahead | 180622T185006Z | snail_ |
| 028 | Backhand | 180918T063150Z | Jo King |
| 017 | Matlab | 180827T024417Z | DimChtz |
| 014 | Z80Golf | 180827T022456Z | Bubbler |
| 061 | Java OpenJDK 8 | 180602T111700Z | Nitish |
| 008 | 05AB1E | 180702T141134Z | Tomb |
| 012 | Powershell | 180702T082222Z | mazzy |
| 034 | Haskell | 160805T155043Z | Rodrigo |
| 019 | Bash + coreutils | 160804T145512Z | CousinCo |
| 015 | Q'Nial7 | 180602T223611Z | M L |
| 020 | Python 2 | 180603T051004Z | Joseph |
| 017 | Glee | 180602T225433Z | M L |
| 021 | Python 2 | 180602T224934Z | Chas Bro |
| 045 | PHP | 180528T141820Z | Francisc |
| 028 | Python 3 | 180601T194642Z | Scott No |
| 062 | Kotlin | 180601T193934Z | JohnWell |
| 025 | Tcl | 170206T161712Z | sergiol |
| 031 | Pari/GP | 180529T130906Z | alephalp |
| 054 | Prolog SWI | 180529T123211Z | ASCII-on |
| 036 | C | 180526T012451Z | Geo |
| 032 | Kotlin script | 180525T181439Z | snail_ |
| 005 | Japt R | 180215T114855Z | Shaggy |
| 050 | SNOBOL4 CSNOBOL4 | 171220T212255Z | Giuseppe |
| 050 | Charm | 180525T093821Z | LyricLy |
| 091 | Whitespace | 180525T093534Z | Kevin Cr |
| 005 | Japt R | 180525T043240Z | Bubbler |
| 027 | Javascript REPL | 180213T014251Z | NTCG |
| 028 | Befunge93 PyFunge | 180214T214554Z | MercyBea |
| 005 | Canvas | 180212T215008Z | hakr14 |
| 023 | Julia | 180213T220222Z | eaglgene |
| nan | Python 3 | 180130T135852Z | Mercury |
| 013 | Micrsocript II | 180212T231627Z | SuperJed |
| 022 | Wumpus | 180212T043358Z | Jo King |
| 044 | Momema | 180212T033738Z | Esolangi |
| 032 | Io | 180212T021206Z | iovoid |
| 030 | Thue | 160901T154455Z | MegaTom |
| 309 | JVM Bytecode | 180207T210250Z | Citty |
| 024 | TSQL | 180207T160050Z | Paul |
| 054 | Lost | 180206T045032Z | Wheat Wi |
| 023 | FALSE | 180130T150258Z | 12Me21 |
| 041 | Kotlin | 170903T202133Z | jrtapsel |
| 041 | dc | 171223T013014Z | cab404 |
| 015 | Befunge98 | 171221T144013Z | Jo King |
| 034 | Lua | 170302T234116Z | Josh |
| 045 | TSQL | 160804T152607Z | Anuj Tri |
| 068 | Acc!! | 171221T213638Z | qqq |
| 033 | Befunge | 171221T140836Z | Jo King |
| 036 | ABCR | 171220T212902Z | Steven H |
| 041 | Symbolic Python | 171220T210746Z | FlipTack |
| 252 | Chef | 171220T210519Z | A.B. |
| 022 | Google Sheets | 171008T155525Z | Taylor R |
| 006 | SOGL V0.12 | 171008T155345Z | dzaima |
| 021 | Crystal | 161108T122805Z | Zatherz |
| 078 | Powershell | 171008T120142Z | Ally Wil |
| 033 | R | 171008T061920Z | xyz123 |
| 045 | S.I.L.O.S | 160804T133508Z | Rohan Jh |
| 062 | Java 8 | 170928T090818Z | Roberto |
| nan | Hexagony | 160804T164411Z | FryAmThe |
| 056 | 4 | 170903T222833Z | Uriel |
| 006 | Pyth | 170903T190700Z | Stan Str |
| 013 | q/kdb+ | 170607T201308Z | mkst |
| 012 | k | 170617T205448Z | zgrep |
| 065 | Javascript | 160804T123238Z | Dylan Me |
| 009 | APL | 160804T100228Z | Adá |
| 015 | Micro | 170609T123111Z | raddish0 |
| 096 | C# | 170609T074501Z | Deepak K |
| 012 | Syms 1.4 | 170608T054644Z | Calculat |
| 007 | 05AB1E | 170607T194507Z | sporkl |
| 028 | Common Lisp | 170206T193544Z | user6516 |
| 034 | R | 170502T080834Z | Masclins |
| 041 | OIL | 170303T135318Z | L3viatha |
| 023 | MATLAB / Octave | 170504T182115Z | Grant Mi |
| 036 | OCTAVE | 170504T102349Z | Michthan |
| 023 | Google Sheets | 170504T060429Z | Grant Mi |
| 021 | LibreLogo | 170504T054422Z | Grant Mi |
| 022 | Fourier | 160811T133348Z | Beta Dec |
| 008 | RProgN 2 | 170426T002302Z | ATaco |
| 077 | BrainFlak | 170425T211531Z | DJMcMayh |
| 016 | Perl 6 | 160804T143336Z | Brad Gil |
| 017 | Syms 1.3 | 170302T223132Z | Calculat |
| 035 | Python 3 | 170302T214843Z | hubacub |
| 024 | Syms | 170302T185722Z | Calculat |
| 041 | Cardinal | 170302T204133Z | fəˈnɛtɪk |
| 009 | Japt | 170302T042349Z | Oliver |
| nan | 170217T120051Z | Shaun Be | |
| 053 | Z80 TI83+ | 170217T052105Z | Conor O& |
| 009 | Japt | 170211T191130Z | ETHprodu |
| 041 | QC | 170211T171036Z | user6333 |
| 022 | Perl | 170209T235631Z | Kjetil S |
| nan | 170206T005236Z | GCaldL | |
| 023 | Scala | 170206T092107Z | Aria Ax |
| 028 | 8th | 170206T065310Z | Chaos Ma |
| 018 | QBIC | 160804T094147Z | steenber |
| 019 | SmileBASIC | 170205T215358Z | 12Me21 |
| nan | 160829T112131Z | Andrew D | |
| 017 | memes | 161227T024905Z | devRiche |
| 010 | Stuck | 161108T165443Z | Kade |
| 068 | BrainFuck | 161108T164058Z | Mitchell |
| 011 | D2 | 161021T214357Z | TuxCraft |
| 021 | SX | 160912T062816Z | XiKuuKy |
| 027 | GNU sed | 160829T114954Z | seshouma |
| 041 | S.I.L.O.S | 160901T203751Z | acrolith |
| 036 | Racket | 160804T131600Z | Winny |
| 046 | Groovy 46 Bytes | 160908T134155Z | Magic Oc |
| 036 | Racket | 160906T231040Z | rnso |
| 131 | ISOLADOS | 160906T225959Z | acrolith |
| 049 | Stata | 160901T181357Z | f1rstgue |
| 032 | PHP | 160804T132414Z | Crypto |
| 043 | Brainfuck | 160808T051508Z | Sp3000 |
| 054 | Emojicode | 160805T171226Z | betseg |
| 024 | Deadfish ~ | 160829T100619Z | Destruct |
| 027 | GolfScript | 160828T192241Z | FedeWar |
| 021 | TIBasic | 160827T214141Z | Timtech |
| 023 | Groovy | 160822T070016Z | M. Justi |
| 049 | Fortran | 160812T065902Z | MH. |
| 060 | HTML & CSS | 160805T131217Z | ʰᵈˑ |
| 036 | Jade & CSS | 160818T123041Z | ʰᵈˑ |
| 105 | LaTeX | 160814T133316Z | MH. |
| 035 | Awk | 160805T105450Z | manatwor |
| 007 | Pip | 160812T210244Z | DLosc |
| 072 | Grocery List | 160812T175446Z | Business |
| 044 | Oracle SQL 11.2 | 160812T095400Z | Jeto |
| 019 | MSM | 160811T224425Z | nimi |
| 010 | Convex | 160811T164210Z | GamrCorp |
| 008 | Vim | 160804T111644Z | TuxCraft |
| 022 | DOG | 160804T182229Z | Business |
| 033 | Xtend | 160810T163308Z | charlie |
| 030 | Factor | 160809T214216Z | fede s. |
| 171 | ArnoldC | 160809T185902Z | Business |
| 095 | MarioLANG | 160805T165451Z | Business |
| 031 | Befunge '98 | 160809T161049Z | MegaTom |
| 012 | PowerShell | 160804T130122Z | AdmBorkB |
| 035 | TSQL | 160805T131752Z | datagod |
| 035 | Swift | 160808T224954Z | Alexande |
| 015 | ><> | 160807T073437Z | Sp3000 |
| 049 | C# | 160805T124333Z | Prajay B |
| 026 | Mumps | 160808T192544Z | zmerch |
| 046 | PHP | 160808T172122Z | Linnea G |
| 013 | Vitsy | 160808T145539Z | Addison |
| 036 | Lua | 160805T212715Z | Seeseeme |
| 008 | Emacs | 160804T132907Z | YSC |
| 015 | Fuzzy Octo Guacamole | 160808T015359Z | Riker |
| nan | Unary | 160807T234335Z | acrolith |
| 031 | VBA | 160807T230659Z | Joffan |
| 014 | PowerShell | 160807T225309Z | Ben N |
| 007 | Jelly | 160807T195603Z | Jonathan |
| 020 | Ruby | 160806T221110Z | owlswipe |
| 051 | Scheme | 160807T130543Z | Alan Thi |
| 039 | Neoscript | 160807T124039Z | TuxCraft |
| 029 | Gibberish | 160807T010915Z | acrolith |
| 011 | Sesos | 160805T134438Z | Sherlock |
| 026 | 3var | 160805T100443Z | Leaky Nu |
| 084 | Go | 160805T144549Z | Tom Scan |
| 073 | ListSharp | 160805T174914Z | downrep_ |
| 136 | HTML | 160805T164450Z | Skxrda |
| 081 | JavaScript 115 106 | 160805T163724Z | Richard |
| 022 | Underload | 160805T155854Z | MegaTom |
| 026 | Bc | 160805T151413Z | manatwor |
| 038 | Clojure | 160805T131251Z | Michael |
| 239 | Same | 160805T132537Z | TuxCraft |
| 006 | Pyke | 160804T103208Z | Blue |
| 030 | Lua | 160805T113713Z | Katenkyo |
| 023 | Groovy | 160805T111532Z | manatwor |
| 031 | Gema | 160805T103504Z | manatwor |
| 018 | jq | 160805T104413Z | manatwor |
| 021 | Arcyóu | 160805T103121Z | Leaky Nu |
| 137 | 99 | 160805T102708Z | Leaky Nu |
| 010 | Japt | 160805T101336Z | nicael |
| 039 | PostgreSQL | 160805T082913Z | dwana |
| 030 | MSX BASIC | 160805T074213Z | Konamima |
| 023 | Python 3 | 160804T093750Z | Destruct |
| 022 | Julia | 160804T164107Z | plannapu |
| 045 | Javascript | 160805T064525Z | svarog |
| 108 | C# | 160804T103208Z | Richard |
| 031 | Notepad | 160804T160744Z | Micah Do |
| nan | 160804T235049Z | cgage1 | |
| 018 | dc | 160804T173225Z | Delioth |
| 030 | Bash pure | 160804T220302Z | Dennis |
| 017 | tinyAll | 160804T205539Z | Ismael M |
| 007 | Actually | 160804T200834Z | user4594 |
| 022 | Wolfram | 160804T194625Z | Travelli |
| 029 | R | 160804T105937Z | Mamie |
| 045 | Swift 2 | 160804T193442Z | Jojodmo |
| 026 | EXCEL | 160804T192730Z | user5630 |
| 018 | Ruby | 160804T162249Z | anna328p |
| nan | Notepad++ | 160804T183341Z | Ismael M |
| 047 | C | 160804T174304Z | Chris Bo |
| 039 | Befunge | 160804T172548Z | user5585 |
| 041 | Javascript using external library Enumerable | 160804T151359Z | applejac |
| 008 | Jelly | 160804T171152Z | Dennis |
| 024 | Perl | 160804T163157Z | Dancrumb |
| 050 | TSQL | 160804T160925Z | alroc |
| 088 | C# | 160804T155027Z | pay |
| 029 | Haskell | 160804T152436Z | nimi |
| 022 | Sprects | 160804T145647Z | Erik the |
| 039 | C gcc | 160804T113504Z | orlp |
| 084 | C | 160804T140545Z | Joel Tra |
| 030 | Maple | 160804T140449Z | DSkoog |
| 014 | MATLAB | 160804T140106Z | PieCot |
| 008 | MATL | 160804T132019Z | Luis Men |
| 039 | Frink | 160804T105703Z | Frink Us |
| 075 | C++ | 160804T125844Z | arnsong |
| 028 | ><> | 160804T125440Z | Leaky Nu |
| 046 | BASH | 160804T124148Z | Joe |
| 035 | ><> | 160804T123202Z | owacoder |
| 017 | Perl | 160804T113548Z | Dom Hast |
| 022 | golflua | 160804T122929Z | manatwor |
| 079 | C# | 160804T121002Z | TheLetha |
| 008 | CJam | 160804T095505Z | Martin E |
| 047 | Brainfuck | 160804T111951Z | Leaky Nu |
| 015 | Ruby | 160804T111310Z | manatwor |
| 074 | Brainfuck | 160804T110044Z | Destruct |
| 018 | SpecBAS | 160804T110759Z | Brian |
| 007 | 05AB1E | 160804T110659Z | Emigna |
| 020 | Cheddar | 160804T104944Z | ASCII-on |
| 024 | Cheddar | 160804T105637Z | Leaky Nu |
| 037 | JavaScript ES6 | 160804T093751Z | ASCII-on |
| 034 | Golisp | 160804T102938Z | TuxCraft |
| 076 | C++ | 160804T102449Z | user5420 |
| 025 | /// | 160804T101148Z | Leaky Nu |
| 041 | Batch | 160804T100732Z | Neil |
| 024 | Mathematica | 160804T100713Z | Martin E |
| 009 | J | 160804T095403Z | Leaky Nu |
| 052 | Racket | 160804T100236Z | Steven H |
| 010 | Jellyfish | 160804T093905Z | Martin E |
| 012 | Retina | 160804T094638Z | Martin E |
| 2221 | Python 2 | 160804T093630Z | shooqie |
| 021 | Python 2 | 160804T094228Z | Steven H |
| 023 | Python 3 | 160804T093525Z | hellowor |
| 006 | Pyth | 160804T093141Z | orlp |
| 063 | Java 7 | 160804T093515Z | Geobits |
tinylisp 2, 33 bytes
(quiet(m w(repeat"**********\n"10
A full program, which also works at the REPL prompt. Try It Online!
Explanation
(quiet(m w(repeat"**********\n"10)))
"**********\n" ; Literal string: 10 asterisks and a newline
(repeat 10) ; Make a list of 10 copies of that value
(m w ) ; Map the write function to each
(quiet ) ; Don't output the return value of map
If a function solution is allowed, here's an anonymous function that takes no arguments, prints the requested output, and returns some garbage (31 bytes):
(\()(m w(repeat"**********\n"10
It's the same solution as above, just returning the result of m (a list of 10 copies of nil) instead of suppressing its output.
Uiua, 12 bytes
⍥(&p↯10@*)10
Explanation:
⍥(&p↯10@*)10
⍥( )10 => repeat 10 times
&p↯10@* => print 10 asterisks
Prolog (SWIPl), 63 / 68 bytes (depending on how to count)
-1*_.
A*0:-writeln(*),C is A-1,C*9.
A*B:-write(*),C is B-1,A*C.
Query with
9*9.
Online Example
Try it online, but take note that since the bug has been fixed.writeln/1 has a bug in Swish, causing it to print a new line before as well as after. I've replaced it with write/1,nl/0 which should be (according to documentation) its equivalent. This raised the byte count of the example
On the Byte Count
I'm not sure how to count the query, but if it is to be counted towards the total byte count, it's 5 bytes (including an Enter).
X86‐64/Linux Machine Code, 32 bytes
Usage:
$> gcc -s -static -nostartfiles -nodefaultlibs -nostdlib -Wl,--build-id=none print.S -o print
$> ./print
Notes:
- Size is measured in machine code (i. e. 32 bytes of PROGBITS; .text, .data, etc.)
- −4 more bytes without
EXIT_CLEANLY(it will segfault to exit).
/* Comment out EXIT_CLEANLY to save 4 bytes. */
#define EXIT_CLEANLY
.global _start
.text
_start:
/* Incoming registers are zero. */
/* Use stack for storage. */
push %rsp
pop %rsi
loop:
/* '*' in output buffer. */
movb $0x2a, (%rsi)
/* First round we have SYS_read + length 0 which is essentially
a nop. */
syscall
/* Assuming no IO error, read(0) will return 0. */
/* bh is initially 0, so this won’t loop in initial fallthrough. */
decb %bh
jg loop
movb $0xa, %bh /* 0xa == '\n'. */
movb %bh, (%rsi)
/* Initial round this will be a nop, same as above. */
syscall
/* SYS_write. */
movb $1, %al
/* STDOUT. */
movl %eax, %edi
/* 1-byte at a time. */
movb $1, %dl
/* After 10 iter this will have signed overflow. */
addb $0xc, %bl
jns loop
#ifdef EXIT_CLEANLY
/* Exit. */
movb $60, %al
syscall
#endif
Google Sheets, 33 bytes
=MAKEARRAY(10,10,LAMBDA(a,b,"*"))
Mindustry, 71 bytes
set i
print "**********\n"
op add i i 1
jump 1 lessThan i 10
printflush
Requires a processor connected to a message block, which is used as stdout.
Among Us, 170 bytes
ORANGE SUS SUS RED SUS LIME SUS BLUE SUS SUS PINK SUS ORANGE SUS VENTED VENTED WHO PURPLE SUS GREEN SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS BLUE SUS GREEN SUS SUSSY WHERE
Explanation
ORANGE SUS SUS A1 += 10 2x (A1 = 20)
RED SUS A1 += 1 (A1 = 21)
LIME SUS A1 *= 2 (A1 = 42 = '*')
BLUE SUS SUS PUSH A1 2x
PINK SUS A1 = 0
ORANGE SUS A1 += 10 (A1 = 10 = '\n')
VENTED VENTED A2 += 10 2x (A2 = 20)
(now A1=10, A2=20, stack=[42, 42])
WHO while (A2 != stack_top) {
PURPLE SUS POP
GREEN SUS SUS SUS SUS SUS print(stack_top) 10x
SUS SUS SUS SUS SUS
BLUE SUS PUSH A1
GREEN SUS print(stack_top)
SUSSY A2 -= 1
WHERE }
AWK
awk 'BEGIN{print$-($_=(_="*****")_)^gsub(/./,RS$_)}'
or
awk 'BEGIN{_=(_="*****")_;gsub(/./,_ RS,_);print _}'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Many seem to overlook the fact that gsub(/./,_,_) is identical to calling repeat() if the repeat count is same as length of input string.
+Output, 19 12 bytes
Note: +Output is an extension to -Output, both of which are languages I made.
"*"a*aU+a*oX
Explanation: This language revolves around a stack. Digits 0-f will push the number onto the stack. a (10) is used a few times to push 10.
"*"a* | pushes * and multiples the string by 10 to get **********
aU+ | push newline with aU and add the strings together to get **********\n
a*oX | multiply **********\n whole thing by 10 and output it
Old answer (19 bytes)
a"*"a*oaUo1n+:!#X_#
Explanation:
a | Set loop counter (10)
"*"a*o | Push *, multiply it by 10 to get **********, and output it
aUo | Output newline
1n+ | Decrement the loop counter
:!#X_# | Check if loop counter is 0
Civet, 33 bytes
console.log '**********'for[0..9]
Compiles to this JS:
for (let i = 0; i <= 9; ++i) {
console.log("**********");
}
GNU nroff, 45 bytes
Now using extension!
.nf
.while (\na < 10) \{**********
\R'a +1'\}
Nroff, 49 47 bytes
-2 for .sp 0 to .nf
.de D
**********
.nf
.if \\$1 .D \\$1-1
..
.D 9
SQL (Oracle), 48 bytes
select'**********'from dual connect by level<11;
YASEPL, 26 22 bytes
=l$11`1=f$42»;f,10<!-[
Easyfuck, 24 21 bytes
ke#ä/DCSűWîUµŻSHYSHY|ąĺÔ+ž]
due to lack of unicode representations for c1 control characters, they have been replaced by their superscripted abbreviations
Decompressed:
5Y$>!>!{+{J[->[->.<]!.<]
5Y$>!>!{+{J[->[->.<]!.<]
5Y set cell 1 to 80 (5*16) and flip the bit order setting it to 10
$>!>! copy cell 1 to storage and set cells 2 and 3 to storage
{+{ left-shift, increment, and left-shift again cell 3, setting it to 42
J[ ] go to cell 1 and begin a while loop
->[ ] decrement cell 1 and go to cell 2 to begin another while loop
->.< decrement cell 2 and print cell 3 (42 is *)
!.< set cell 2 to storage and print it (10 is new line)
morsecco: 109 bytes
The shortest way seems to be to define a new command repeating a given string a given times:
. . .- .- --.. .. - -. - . -. -.-. . .. . -. .-- . -.-.-. -.- - . -.-. -. . -.-. -.- - -.-. . . -.-. -. ---
The command itself is only 37 bytes:
. .- .-to decrement the number (Enter minus 1 andAdd)--.. ..toZeroskip to the.., leaving the input string- -. - .we need some stack juggling to duplicate the next of stack (over and swap)-.is the recursive call with the decremented number-.-. .Concatenates the returned string from the command to itself..is currently not used, so it can currently be used as a skip target. This may fail in future versions of morsecco
Unfortunately, the surrounding code is twice as long:
. -. .--Writes the code to address-.. -.-.-. -.- -Enter 42 andKonvert toText. -.-. -.Enter 10 and call the new command. -.-. -.- - -.-. .add the newline to the string; expensive, but necessary. -.-. -. ---call the new command again with 10 andOutput
Fun fact: this is the length of the challenge output (100 stars plus 9 newlines). Always keep in mind that morsecco wastes a factor 5 of bytes by restricting itself to only three symbols. With 22 real information bytes, it could compete.
///, 24 bytes
Leaky Nun's answer finally needed to be proven not golfed far enough!
/5/*****//-/55
55
/-----
Uiua, 10 bytes
≡&p↯⊂.10@*
≡&p↯⊂.10@* full program
@* the character literal '*'
⊂.10 the golfiest way to produce the dimensions of the matrix [10,10]
↯ reshape to get 10x10 matrix of '*'s
≡&p print each row with newline
Nibbles, 13 12 nibbles (6.0 bytes)
^10: ^10"*" "\n"
Explanation
^10: ^10"*" "\n" #
----------------------------------------
^10"*" # replicate 10 times
: "\n" # append
^10 # replicate 10 times
-1 Nibble thanks to xigoi
Java, 103 Bytes   92 Bytes
class Main{public static void main(String[]a){System.out.print("**********\n".repeat(10));}}
TypeScript's Type System, 71 bytes
type F<A extends{}[]=[]>=A extends{length:10}?A:F<[...A,"**********"]>;
Try it at the TypeScript playground!
Just barely longer than Java :)
Type F recursively appends "**********" to array A until A's length is 10.
If you need the output to be a string and not a list of lines, here's an 83 byte version:
//@ts-ignore
type F<A=[],S="">=A extends{length:10}?S:F<[...A,1],`${S}
**********`>
Try it at the TypeScript playground!
This one recursively appends "\n**********" to string S while appending 1 to array A until A's length is 10. We need to do it like this because you can't get the length of a string in TypeScript's type system without converting it to a list first, so it's shorter to have a list just to keep track of iteration.
The //@ts-ignore is necessary because the compiler doesn't want to spread A, which it can't tell is a list, or inject S, which it can't tell is a string, into the main string. We could explicitly tell the compiler that A extends{}[] (A is a list of something) and that S extends string, but that comes out to be a lot longer than just ignoring the errors.
TacO, 25 bytes
0 01
1 *"*"
*###"\n"
w
@
Explaination
The program is a 2D program which can be broken up as so:
@ ; Program Entry
w ; Write the result of everything STDOUT concatenated together
*10 ; Repeat 10 times
*10 ; Repeat 10 times
"*" ; Append "*"
"\n" ; Append a newline
Or the psudocode:
write(repeat(10,repeat(10,"*")+"\n")
Nibbles, 4.5 bytes (9 nibbles)
`/10^$"*"
^ # replicate
"*" # an asterisk
$ # 100x
# (this is a default value for $
# when the program receives no input)
`/ # split into chunks of
10 # 10
Rattle, 13 bytes
*|![[b]10B]10
Explanation
*| take "*" as a variable
! disable implicit output
[ ......... ]10 loop 10 times
[ ... ]10 loop 10 times
b concatenate "*" to buffer
B print and reset buffer
Bits, 191 bits = 23.875 bytes
00000000000000000000000000000000000000000000000000000000000011100010110000011111011001111101100111110110011111011001111101100111110110011111011001111101100111110110011111011001110000011100011
Explained
- The long string of
0s at the start is to make a string of length 10. (This is the only way to start aforloop in Bits) 11100010starts theforloop:1100000is a separator so the strings don't join together1111101100is the code for a*. We repeat this 10 times to get**********. (Note: this is the only way to repeat a string in Bits)11100000prints the string
11100011closes theforloop
Screenshot
V, 7 bytes
10é*10Ä
About as straightforward as an answer can be.
Explanation:
10 "10 times:
é* "insert an asterisk
10Ä "make 10 copies of the current line
5 bytes:
10O±*
Explanation:
10O " Insert the following on the next ten lines:
± " 10 copies of
* " an asterisk
This didn't work when the challenge was posted because of a bug.
Triangular , 28 bytes
A\(A@1].p-p..pA@...](/*76-1<
Expanded version:
A
\ (
A @ 1
] . p -
p . . p A
@ . . . ] (
/ * 7 6 - 1 <
Commands executed, excluding directional commands:
A(1-A(1-67*@p]A@pp]
Carrot, 10 9 bytes
*^*9^
^*9
Try it online! (copy & paste only)
*^ //pushes "*" to the stack
*9 //add 9 more copies of itself
//stack = "**********"
^\n^ //append a newline to it
*9 //add 9 more copies of the resulting string
//implicit output
Brachylog, 11 bytes
"*"j₁₀ẉ₂ⁱ¹⁰
Explanation
"*"j₁₀ẉ₂ⁱ¹⁰
"*" Asterisk
j₁₀ Join 10 copies together into one string
ⁱ¹⁰ Repeat 10 times:
ẉ₂ Write (with trailing newline; predicate output = input)
Alternately, it's possible to port Fatalize's Brachylog v1 solution in 11 bytes:
Ḋ≜∧"*"j₁₀ẉ⊥
Ḋ≜ Pick some number 0 to 9
∧ Its value doesn't matter, it just matters that we picked it
"*" Asterisk
j₁₀ Join 10 copies together into one string
ẉ Write (with trailing newline)
⊥ Force backtracking
Brachylog v1, 15 bytes
9ye,"*":9jw@Nw\
Explanation
This exploits backtracking to loop; we create ten useless choice points at the beginning so that it writes ten times the string "**********\n".
9ye, Pick a number between 0 and 9 (there are thus 10 choice points here)
"*":9j Concatenate "*" 9 times to itself
w@Nw Write that string and write a line break
\ False (trigger backtracking: pich another one of the ten numbers)
Knight, 14 bytes
O*+*"*"10"
"10
Ungolfed:
OUTPUT Print the string:
* "*" 10 10 copies of "*"
+ "\n" newline appended
* 10 10 times concatenated
Flobnar, 27 bytes
6v|<
+|_,
4|<v|@
7, |
*< |<
Same but abusing vertical if |.
Flobnar, 32 bytes
7 009
*,!__<
6 0^|<
>___,+
^!|@
The ultimate abuse of the behavior of _:
'Horizontal if', denoted
_, checks what the cell on the other side of it evaluates to. If that value is nonzero, it evaluates to what the cell west of it evaluates to; otherwise, it evaluates to what the cell east of it evaluates to. In either case, at most two evaluations are made.
If _ is entered horizontally, it can be used to evaluate the other side twice, or various numbers of times if chained with other _s and/or horizontal arrows.
The first half (printing * 10 times) works like this:
7
*,! Print an asterisk and return 1
6
7 00
*,!__< Print asterisk 10 times (enter at the lower right corner):
6 ^|<
| Check if the west returns nonzero value
^ evaluate north
_ evaluate other side, which is 0; evaluate east
_ evaluate other side:
< evaluate west
_ evaluate other side:
_ evaluate other side:
..! print * and return 1
nonzero, so evaluate west
..! print * and return 1
nonzero, so evaluate west
_ evaluate other side: (repeat; * is printed 4 times so far)
nonzero, so evaluate west
_ evaluate other side: (repeat; * is printed 6 times so far)
nonzero, so evaluate north of |
_ the other side is 0, so go right to < (repeat; * is printed 10 times in total)
The other half (going through the large loop 10 times) is more straightforward, so figuring out that part is left for the exercise to the reader.
Flobnar, 40 bytes
d1_ +
@+|\<\
::
g- < >
:1 6
%9>*>
>+,7_,
More explicitly controlled loop. gets 100 (d) from the position (0, 0) of the grid, and repeats that many times, printing * at every iteration and a newline every 10 loops.
Python 3, 23 bytes
print(('*'*10+'\n')*10)
(Note: new to codegolf and stackexchange in general, this is my first attempt at any code-golfing challenge)
Edit: this is a pretty generic answer, and pretty boring too, although valid and pretty short.
BQN (CBQN), 14 bytes
•Out˘10‿10⥊"*"
Explanation
•Out˘10‿10⥊"*"
"*" String (1-dimensional character array) containing an asterisk
10‿10⥊ Reshape into a 10 by 10 array of asterisks
˘ For each row:
•Out Print with a trailing newline
Regenerate -a, 12 10 bytes
{,9}\*{10}
Explanation
{,9}\*{10}
Empty string
{,9} Repeated 0 to 9 times
\* Literal asterisk
{10} Repeated 10 times
The -a flag outputs all possible matches, separated by newlines. There are ten ways to match the given pattern, depending on how many times the empty string is repeated, so ten matches are output. It so happens that every match consists of ten asterisks.
Regenerate, 13 bytes
(\*{10}
){10}
Explanation
(\*{10}\n){10}
\* Literal asterisk
{10} Repeated 10 times
\n Followed by a newline
( ) All of that
{10} Repeated 10 times
Python 3, 23 bytes
print(("*"*10+"\n")*10)
Felt like entering a Python 3 program too.
Python 3 (23 bytes)
print(('*'*10+'\n')*10)
tinylisp, 58 bytes
(d A(q((n *)(i n(i(disp *)0(A(s n 1)*))*
(A 9(q **********
We define a function A with two parameters: n is the number of iterations, and * is a row of asterisks (it will always be ten of them, but it saves bytes to pass that as an argument). If n is truthy (nonzero), we display the asterisk row (with trailing newline) and recurse with n minus 1. If n is falsey (zero), we simply return the asterisk row.
Calling the function with n = 9 results in 9 disp calls; the return value of the function is then displayed, giving us our 10th row.
Headascii, 44 43 bytes
+++++^^DONE.U^[]]]]++[{]PPPPPPPPPPRPD-^)!:}
Try it here! Code will need to be copied, and executed like this:
erun("+++++^^DONE.U^[]]]]++[{]PPPPPPPPPPRPD-^)!:}")
My first code golf answer. One trailing newline.
Thanks to @Aaroneous Miller for -1 by showing me N is valid for no input programs.
Explanation:
+++++^^DONE.U^[]]]]++[{]PPPPPPPPPPRPD-^)!:}
+++++ # add 5 to r0
^^ # add r0 to r1 twice
D # set r0 to r1 (10)
O # push r0 to array
N # set r0 to 1 if no input
E. # jump to r0th . and set non string registers to 0
U # set r0 to first item in array (10)
^ # add r0 to r1
[ # set r2 to r0 and set r0 to 0
]]]] # add r2 to r0 4 times (40)
++ # add 2 to r0
[ # set r2 to r0 (42) and set r0 to 0
{ } # loop
] # add r2 to r0 (42)
PPPPPPPPPP # concatenate r0 (*) to the string register 10 times (**********)
RP # set r0 to the first item of the array again (10) and concatenate r0 (\n) to the string register (**********\n)
D-^ # decrement r1 and set r0 to r1
) # if r0 != r3 (0), jump past next :. either way, set r0 to r3 (0)
! # print string register
: # jump to next ; (eof halt)
If there's a better way to format these, let me know, I just saw everyone else doing it haha
APOL, 23 bytes
*(+(*("*" 10) "\n") 10)
Hodor, 240 bytes
hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");hodor.hod("**********");
I'm not good at Hodor
Tagscript, 45 bytes
{replace(a,\*\*\*\*\*\*\*\*\*\*
):aaaaaaaaaa}
I don't know where you can run this lang except through carlbot so heres a link to that
Does this count? haha
EDIT: Potentially controversial, but I can shave off 10 bytes if I don't escape the asterisks:
{replace(a,**********
):aaaaaaaaaa}
Carlbot doesn't actually parse asterisks as a special character, it's Discord's markdown system that displays the text as modified. The exact text context of the output would be
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
If this 35 byte solution is valid, I also argue that the original 45 byte solution is invalid, as while only the 10x10 of asterisks is displayed by Discord, the actual text context of Carlbot's message would be
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
\*\*\*\*\*\*\*\*\*\*
Which would be incorrect.
KonamiCode, 103 bytes
v(^^^^>^^)>(^)v(^>)>(^^)v(>)>(^^^)v(>)S(^>)L(>)>(^^)v(>)L(^)>(>)<<>(^^)v((>))B(^)>(^)<<>(^^^)v((>))B(>)
Aussie++, 71 bytes
G'DAY MATE!
I RECKON x IS A WALKABOUT FROM [0TO 9]<GIMME "**********";>
Tested in commit 0a5de7e, in which for loops do not behave as per the spec. The version presented here actually works in that commit.
Minim, 42 37 35 Bytes
New solution halts by checking if [0] > 99.
$<42._^++[0]%10.$<10._^[0]>99.C=-1.
With whitespace and comments:
$< 42. ; Print 42 as unicode '*'
_^ ++[0] % 10. ; Increment index 0 and skip next stmt if index 0 mod 10 is nonzero
$< 10. ; Print 10 as unicode '\n'
_^ [0] > 99. ; Skip next stmt if index 0 is greater than 99
C = -1. ; Set program counter to -1 (advances to 0 afterwards)
Old solutions halted by checking [0] == 100...
$<42._^++[0]%10.$<10._^[0]==100.C=-1.
... or used labels and gotos.
_>1.$<42._^++[0]%10.$<10._<?([0]-100)._>0.
Cascade, 32 27 bytes
"
*
*
*
*@
*}
*|
*/
*
*.
*/
Aha! It turns out just printing ten asterisks ten times does beat out my more complex answer. Unfortunately though, writing this program exposed not one, but two bugs in my interpreter. Below is my longer, but higher effort solution:
Cascade, 32 bytes
_9'2
^*|
\ !]
(.n
n?\
\%!|
n)+\
One of my more compact Cascade programs. I'm still not sure if it would be shorter to just print 10 asterisks 10 times instead of using a counter, but I'm satisfied with this, especially how the bottom intersects with the top.
Explanation
The easiest way to understand the code is know the basic structure. Each instruction can take up to three inputs, each one below it.
+
lcr
These are the left, center and right arguments. In this case, the + instruction is dyadic, meaning it takes the left and right arguments. Most instructions are either dyadic or monadic (taking one argument, the center one). The /\| instructions take only the argument they are pointing to, and the ! instructions skips over the center and takes the argument two below it. Each of these arguments can themselves be code instructions, meaning they chain together in a prefix like notation. For example, this code could be represented by the recursive Lisp-like code:
code = (if (0==(n=dec n))
doboth
(print (
if (% n (+9 2)) ('*')
else (inc 9)
))
(code)
)
If that doesn't make sense, here's an expanded look at the code, which is still a little confusing, but it at least has an idea of which parts are connected to each other through the |/\Xs. Note that the top and bottom rows are the overlap between the two (and same with the left and right).
\ |/|\ \
_ 9 ' 2
/ \ | /
^ * |
/ \ |
\ ! ]
\ \ \/ \
( . n/
| | |
n ? \
/|\ \
\ % ! |
X \\ |
n ) +/\
\ |/|\ \
Starting from the top left corner, we have the first check (_) which executes the right branch only if the left is successful. The left goes down to the ], which sets the n variable (initially 110) to the decrement (() of n, i.e. n=n-1. The check then takes the result of this (the new value of n) and continues if it is positive. This moves onto the branch instruction on the right (^), which executes both the left and right branches.
The left prints (.) the value given by the choice instruction (?). This branches depending on the center value, which is the modulo (%) of n and the addition (+) of 9 and 2. Note that this wraps around to the top again for those digits. If n%(9+2) is 0, then we branch left, which navigates around the % and returns the increment ()) of 9, printing a newline. If it is not divisible by 11, then we go right, skip over the + with a !, and return the character (') of * to print.
Now the right branch of the ^ skips over the n, then goes right, down, and right again, wrapping around both the right edge and the bottom edge to loop back to the _ in the top left. This now loops over the exact same code until n has reached 0, printing ten asterisks and then a newline.
Python 3, 25 24 bytes
-1 byte thanks to @Jo King
*map(print,['*'*10]*10),
Unpacks the map object so it actually prints the output, instead of optimising it away.
V (vim), -v 11 bytes
i*<esc>yl9pyy9p
Insert a * and copy it 9 times towards left and copy the line and paste it nine times.
Also I am a sock of someone :P
-4 as I am an idot.
Subleq (8 bit), 18 bytes
2 -1 42
1 17 0
15 -1 -9
15 17 12
1 8 0
10 10 -9
Explanation
2 -1 42 Print [2] // [2] = 42, ASCII(42) = "*"
1 17 0 [17] = [17] - [1] if [17] <= 0 goto 0 // Loop 10 times
15 -1 -9 Print [15] // [15] = 10 ASCII(10) = <line feed>
15 17 12 [17] = [17] - [15] if [17] <= 0 goto 12 // Set [17] back to -9
1 8 0 [8] = [8] - [1] if [8] <= 0 goto 0 // Loop 10 times
10 10 -9 [10] = [10] - [10] if [10] <= 0 Exit // Exit program
Python 3, 25 bytes
exec("print('*'*10);"*10)
CLC-INTERCAL, 114 bytes.
From this how should I golf off....
DO;1<-#1DO;1SUB#1<-#121DO,1<-#1DO.1<-#512DOCOMEFROM.1~.1DOREADOUT;1+;1+;1+;1+;1+;1+;1+;1+;1+;1+,1(1)DO.1<-.1~#1022
INTERCAL, 109 bytes
Wait, no, I don't even need to make a loop.
PLEASE,1<-#11DO,1SUB#1<-#172DO,1SUB#11<-#260PLEASEREADOUT,1DO,1SUB#1<-#252DOREADOUT,1+,1+,1+,1+,1+,1+,1+,1+,1
INTERCAL, 116 bytes
mindoverflow said as if they can't loop shorter, but actually you can.
The code below uses .1 as loop counter.
Starting with .1<-512,
iteration is done with DOCOMEFROM.1~.1 and (1)DO.1<-.1~#1022.
PLEASE,1<-#11DO,1SUB#1<-#172DO,1SUB#11<-#260DO.1<-#512DOCOMEFROM.1~.1PLEASEREADOUT,1DO,1SUB#1<-#252(1)DO.1<-.1~#1022
Vyxal j, 8 7 5 bytes
-1 byte cause map lambdas are awesome.
-2 bytes thanks to the j flag
My first attempt at Vyxal.
\*₁*²
Explanation
\* - Push "*"
₁* - Repeat 100 times
² - Format as a square
<flag> - Join by newline
<implicit> - Print it
Python 3, 25 24 23 bytes
Newest answer
print(('*'*10+'\n')*10)
I'm an idjot, I don't need so many parentheses.
2nd answer
print('**********\n'*10)
I shaved off a byte doing it more simply.
1st answer
print((('*'*10)+'\n')*10)
Python can multiply strings, but most of your saving are eaten by print(), so it goes like this:
print((('*'*10)+'\n')*10)
print( # Print to console
(('*'*10) # Put 10 '*' in a row
+'\n' # Append a new line character at the end of the 10 '*'
)*10) # Now do it 10 more times
Commodore BASIC (C64/128, PET, VIC-20, C16/+4, THEC64/Mini, Ultimate64) ~35 tokenised BASIC bytes
0a$="**********":fori=.to9:?a$:next
Very simply, a string is created called a$; this is of 10 asterisks. This is printed to the screen in a for/next loop, which is from zero to nine inclusive. Each string is printed onto a new row on the screen.
A few tokenised BASIC bytes could be saved with:
0fori=.to9:?"**********":next
Though I think this would be less performant (not that performance will matter with such a trivial BASIC listing).
Elixir 53 bytes 50 bytes 48 bytes 40 bytes
IO.puts List.duplicate "**********\n",10
Beginner to Elixir, any thoughts? :D
50 bytes thanks to Underslash
48 bytes thanks to Dom Hastings
40 bytes thanks to Jo King
Arduino, 101 bytes
int i=0;void setup(){Serial.begin(300);}void loop(){if(i++<10)Serial.println("**********");else i--;}
The else case is there to prevent i from overflowing and becoming negative, since the loop() function is called indefinitely.
Elixir, 35 bytes
for _<-0..9,do: IO.puts"**********"
Originally suggested to @Chester Lynn on their answer.
Malbolge, 271 bytes
Generated here (linear generator). I tried other methods too but it took me pretty long time so I could not wait for completion.
D'`_:pon}}kXyxx5R-,s0Npn9+k#(EgDU0zyba+u)]xwvunV3210/.-,+*hg`H^c\"`_AW\UyxwvutsrqpJIHMLEDCg*@E>ba`_^]\[ZY9y765.-,+O/.nmJIHGFEDCBAya}|{ts9wvunV3210/.-,+*hg`H^c\"`_AW\UyxwvutsrqpJIHMLEDCg*@E>ba`_^]\[ZY9y765.-,+O/.nmJIHGFEDCBAya}|{ts9wvunV3210/.-,+*hg`H^c\"`_AW\Uyxwvutsrqp]
Vyxal, jH, 6 5 4 3 bytes
×*²
Explained
×*²
×* # Push 100 asterisks onto the stack (as a single string) // the H flag initalises the stack with 100
² # Split into pieces of 10 and use the j flag to join on newlines.
Alternatively:
Vyxal, 5 bytes
₁×*²⁋
Deorst, 17 bytes
la
!o*
ERj
E;la
*
Explanation:
la # Push 10
! # For each 1..10:
o* # Push '*'
ER # Reverse stack
j # Convert 10 to char (\n)
E; # Concatenate stack
la # Push 10
* # Multiply
Yggdrasil, 105 bytes
;*
""""""""":""""""""":""""""""":""""""""":""""""""":""""""""":""""""""":""""""""":""""""""":""""""""""
The first few characters set up the memory tree for the program:
;
/ \
* \n
Yggdrasil has the = command for loops, but it unfortunately doesn't work. The only looping it can do is recursively call itself until it hits the recursion limit, so we have to print everything manually. The " command prints the left branch, which is *, and the : command prints both the left and the right branches, which are *\n
Mathematica, 24 bytes
Print@@@Table["*",10,10]
A second (simple) Mathematica proposition, same length
K (ngn/k), 16 14 13 bytes
` 0:10 10#"*"
Thanks to @Bubbler in the k tree for helping me out with this.
¯2 bytes thanks to @Bubbler
¯1 byte thanks to @Bubbler
51AC8, 10 bytes
10[10\*×t]
Explanation
10[10\*×t]
10 # Push 10 (for each loop; looping var)
[ # Begin foreach loop (for 10 times)
10 # Push 10
\* # Push '*'
× # Multiply
t # Pop and print
] # End foreach
Unreadable, 337 319 bytes
'""""""'""'"""'""""""'"""'""'""'""'""'""'""'""'""'""'"""'"""""'""'""""""'""'"""'""""""""'"""""""'""'"""'""""'""""'""""""'""'""'"""'"""""""'"""'"""""'""'""""""'""'""'"""'""""""""'"""""""'""'""'"""'"'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"""""""'"""'"'"""""""'"""
That is quite ... unreadable, have some pseudocode:
Set 2 Set 1 10
While (Increment Set 2 Decrement Get 2)
Second Second
Set 3 Get 1
While (Increment Set 3 Decrement Get 3)
Print Increment*32 Get 1
Print Get 1
05AB1E, 6 bytes
'*T×v,
'* character literal: "*"
T× repeat ten times as a string: "**********"
v for each character y in this string:
, print the top of stack. As the stack is empty and there is no input, this uses the value that was previously on the stack, "**********".
GForth 36 Bytes
: A 10 0 do ." **********" CR loop ;
RAMDISP, 31 bytes.
[P[5[*2]R[M[I[;**********
]]]]]
[P - pipe through the following array
[
5 - 5
[*2] - times 2 [10]
R - create a range of that size [1..10]
[M - for each element in that range
[I - ignore it
[;**********\n] - print eight asterisks and a newline
(real newline was replaced by \n)
]
]
]
]
basic, but works.
PPL, 33 bytes
loop10{
printLine("**********")
}
There is no concept of repeating strings, and the * operator is not overloaded with strings by numbers, so I hardcoded a string of 10 asterisks and printed it 10 times using the loop keyword.
yuno (abandoned), 11 bytes
」*10リュ」ニュア10リュ
xxd using Jelly's codepage:
00000000: f8f6 e6e5 5bf8 5200 e6e5 5b ẏẇȧẓ[ẏR¡ȧẓ[
Explanation
」* push "*"
10 push 10
リュ repeat "*" 10 times
」ニュ push "\n"
ア add / concatenate
10 push 10
リュ repeat "**********\n" 10 times
Equivalently written as ]*10ryu]nyua10ryu
Barrel, 14 13 bytes
^42#10(#10p¶
Explanation:
^42 // push 42 to the accumulator
#10 // do 10 times...
( // defines a code block which becomes a single instruction
// (the parenthesis is self-closing)
#10p // print the accumulator as an ASCII character 10 times
¶ // print a newline
EDIT: removed the closing parenthesis, saving 1 byte, since I found the reason hadn't been able to get it to work right (I had added a newline at the end of my test file! *sigh*).
PHP, 69 Bytes
<?for($i=1;$i<101;$i++){if($i%10!=0){echo('*');}else{echo('*<br>');}}
vim, 8 bytes
10a*<ESC>Y9p
<ESC> is 0x1b.
Annotated
10a*<ESC> # append * 10 times
Y # copy line into default register
9p # paste 9 times
Twue, 31 bytes
a::~**********\n
::=
aaaaaaaaaa
Simply defines the replacement a which maps to printing 10 asterisks. The main body consists of 10 as. Trying a secondary replacement b::=aa or b::=aaaaa both yield 33 bytes, which is unfortunately longer.
Whereas in some Thue interpreters, outputting implicitly outputs a newline, that is not the case in Twue, which must manually insert the newline.
ConTeXt (40 bytes)
Compile it here (note that the magic comment is only here for texlive.net and it's not needed in an offline compilation).
\let~\dorecurse\starttext~{10}{~{10}*\\}
VBScript, 39 bytes
For i=0 to 9
WSH.Echo "**********"
next
VBScript, 53 bytes
For i=0 to 9
WSH.Echo replace(space(10)," ","*")
next
The second solution is slightly more interesting......
Excel, 10 8 keystrokes
In a fresh empty sheet,
Ctrl+GJ10EnterCtrl+Shift+Home*Ctrl-Shift-Enter
Explanation:
- Ctrl+G is a shortcut for the GoTo dialog
- Entering J10 goes to that cell
- Enter closes the dialog
- Ctrl+Shift+Home expands the selection to A1, making a grid of 10x10 cells
- Then we put in the asterisk
- Ctrl+Shift+Enter (instead of plain Enter) fills in the input over all selected cells
Factor, 30 bytes
10 [ "**********"print ] times
Okay, is there a factor vocabulary to print string \$n\$ times? I couldn't find a documentation?
GFortran, 31 29 bytes
print'(10A)',('*',j=0,99)
end
The loop ('*',j=0,99) spits out 100 *s. Formatting directive '(10(A))''(10A)' wraps it.
CSASM v2.3.0.1, 50 bytes
func main:
push "**********\n"
push 10
mul
print
ret
end
mul duplicates a <str> value by a given <i32> amount, concatenating the copies together
05AB1E, 7 bytes
'*T×TF,
'*T×TF, # full program
'*T× # push "**********"
TF # repeat 10 times...
, # output top of stack to STDOUT
# (implicit) exit loop
05AB1E, 7 bytes
'*т×Tä»
'*т×Tä» # full program
» # join....
т× # 100...
'* # asteriks...
ä # split into...
T # 10...
ä # pieces...
» # by newlines
# implicit output
swift 5, 35 bytes
(0...9).map{$0;print("**********")}
The $0 is only needed to prevent a compiler error.
[Update]
Try it online:
https://tio.run/##Ky7PTCsx@f9fw0BPT89SUy83saBaxcC6oCgzr0RDSQsOlDRr//8HAA
R, 39 bytes
cat(c("*","\n")[(0:219)%%21/10],sep='')
Don't know if R coercing indices to integer is commonly used, so thought it worth posting in case someone can do something extra with it!
vJASS (Warcraft 3), 100 76 bytes
Using //! import zinc "<code_path>" command to exclude //! zinc and //! endzinc.
library q{real w;function onInit(){for(0<=w<10){BJDebugMsg("**********");}}}
naz, 44 40 bytes
crossed out 44 is still regular 44 :(
1x1f6a7m9o1o4d1o0m0x1f1f1f1f1f1f1f1f1f1f
This is another one of those cases where a truly recursive definition would actually use more bytes than just repeating the f instruction.
Saved 4 bytes by using division instead of subtraction!
Explanation (with 0x instructions removed)
1x1f # Function 1
6a7m9o1o # Output 10 asterisks
4d1o # Output a newline
0m # Reset the register
1f1f1f1f1f1f1f1f1f1f # Call function 1 ten times
Templates Considered Harmful, 89 bytes
Ap<Fun<If<A<1>,Cat<St<42,42,42,42,42,42,42,42,42,42,10>,Ap<A<0>,Sub<A<1>,T>>>,LF>>,I<10>>
Pretty standard "10 stars 10 times" answer, in the form of a tail-recursive anonymous function.
Ap<
Fun<
If<A<1>,
Cat<
St<42,42,42,42,42,42,42,42,42,42,10>,
Ap<A<0>,
Sub<A<1>,I<1>>>>,
LF>>,
I<10>
>
Batch, 42 bytes
@for /l %%a in (1,1,10) do echo **********
Python -
40 20 23 bytes
print(("*"*10+"\n")*10) # prints a row of 10 *s then a new line, 10 times
This (freshly optimised) code prints an asterisk 10 times, then a newline (should be fixed now), then repeats that 10 times.
BRASCA, 26 24 20 17 bytes
l:[{$[{'*o]xllo$]
Explanation
l: - Initialize stack
[ ] - Do 10 times:
{$ - Decrement and swap
[ ] - Do 10 times:
{'*o - Decrement and print *
xllo$ - Reset and print a newline
x86_16 machine code - 37 bytes
B4 0E MOV AH, 0EH
B9 000A MOV CX, 10
8B D1 MOV DX, CX
8B D9 MOV BX, CX
.LOOP:
B0 2A MOV AL, "*"
CD 10 INT 10H
E3 02 JCXZ .NEWLINE
E2 F8 LOOP .LOOP
.NEWLINE:
B0 0A MOV AL, 10
CD 10 INT 10H
B0 0D MOV AL, 13
CD 10 INT 10H
8B CB MOV CX, BX
4A DEC DX
74 02 JZ .EXIT
75 E9 JNZ .LOOP
.EXIT:
B8 004C MOV AX, 4C00H
CD 21 INT 21H
Running using DOSBox :
Python 3, 26 24 bytes
print((10*'*'+'\n')*10)
Lua, 31 bytes
print(("**********\n"):rep(10))
Not very impressive but I think simpler is shorter in this case.
C (gcc), 41 bytes
main(n){++n<puts("**********")&&main(n);}
Or if you don't have any problem using a function that would work only the first time it's called (because to make it work again you should reset the value of n)
C (gcc), 38 bytes
n=9;f(){puts("**********");n&&f(--n);}
And a 38 bytes dupe
n;f(){++n+1<puts("**********")&&f(n);}
Note that even the first code works only one time, it doesn't reset anything, you need to run the program again to have another 10x10 grid. However for some (questionable) reason they allow printing the grid just once per program run when using main, but not when using another function.
Java 11, 48 chars
Method String.repeat(int)
for(int i=0;i++<10;out.println("*".repeat(10)));
Java 5, 53 chars
for(int i=0;i++<100;out.print("*"+(i%10>0?"":"\n")));
Java 3, 60 chars
Plain old Java
for(int i=0;i++<100;System.out.print("*"+(i%10>0?"":"\n")));
Zsh -F, 19 bytes
yes **********|head
Edit: just saw this exact answer was already posted for bash :(
GNU nano, 14 keystrokes
<C-6>*<C-K><M-:><C-U><C-U><C-U><C-U><C-U><M-:><M-;><C-K><M-;><M-;>
<C-X> refers to CTRL+X, <M+X> refers to META+X.
Explanation
<C-6> Start a selection block
* Type an asterisk (typing does not affect the selection by default)
At this point, '*' is selected.
<C-K> Delete the selection and put it into the cutbuffer. '*'
<M-:> Start recording a macro
<C-U> (5x) Paste 5 times, text is now '*****'
<M-:> Stop macro recording. Macro pastes 5 times now.
<M-;> Run the macro, pasting 5 more '*'s. Text is now '**********'
<C-K> Delete the current line and put it in the cutbuffer. '**********\n'
<M-;><M-;> Run the macro twice, pasting '**********\n' 10 times
Betcha didn't know nano had macros?
Video demo (done in Termux because of visible keyboard, --ignorerc just ignores any RC files that may alter the behavior)
Python 3, 67 bytes
print('\n'.join(''.join('*' for x in range(10))for y in range(10)))
Brian & Chuck, 23 bytes
*{-?
{..........>-.+?
The is the ascii code 11.
Brian:
* "*" 11
{- Restart Chuck's code and subtract 1
? Go to Chuck's code while the first byte is not 0
Chuck:
11 (This will be decremented by 1 each line)
{ Restart Brian's code
.......... Print the "*" 10 times
>-.+ Print the newline
? Go back to Brian's code
Assembly (NASM, 32-bit, Linux), 122 bytes
mov ecx,10
n:push 0xa202a2a
push '****'
push '****'
loop n
mov edx,120
mov ecx,esp
mov ebx,1
mov eax,4
int 128
add esp,120
Bound, 13 12 bytes
10:c42:d*@RS
Thanks to Razetime for the -1 byte
Explanation:
1 # Put 1 onto the stack [1]
0 # Put 0 onto the stack [1, 0]
: # Combine the top two elements [10]
c # Copies the top element [10, 10]
4 # Put 4 onto the stack [10, 10, 4]
2 # Put 2 onto the stack [10, 10, 4, 2]
: # Combine the top two elements [10, 10, 42]
d # Convert the top element into a char [10, 10, '*']
* # Multiply the top two elements [10, '**********']
@ # Sorts the stack ['**********', 10]
R # Repeat the next command n times, where n is top element (10) ['**********']
S # Print the top char/string (creates newlines)
Notepad++, 15 13 keystrokes
*<Ctrl-Shift-R><Ctrl-A><Ctrl-D><Ctrl-D><Ctrl-D><Ctrl-D><Ctrl-A><Ctrl-D><Ctrl-Shift-R><End><Enter><Ctrl-Shift-P>
Saved two keystrokes by using a macro. Explanation to come.
Original code and explanation
*****<Ctrl-D><Del><Ctrl-D><Ctrl-D><Ctrl-D><Ctrl-D><Ctrl-A><Ctrl-D>→<Enter>
We start by inserting five asterisks. CtrlD duplicates this line, leaving the cursor at the end of the first line. Del removes the newline, so now we have a line of ten asterisks.
Four applications of CtrlD give us five lines of asterisks. Next, CtrlA CtrlD duplicates all five lines at once, but it doesn't include a newline between the copies:
**********
**********
**********
**********
********************
**********
**********
**********
**********
Fortunately, the first half is still selected, so if we press →, the cursor will be immediately after the tenth asterisk on the too-long line, and we can add the missing newline with Enter.
CJam, 8 bytes
'*A*N+A*
My first CJam answer!
Explanation:
'* Push an asterisk
A* Multiply by 10
N+ Add a newline
A* Multiply by 10
Implicitly output
x86-16 machine code, IBM PC DOS, 17 bytes
00000000: b10a 8bd1 b82a 0acd 1088 c8cd 294a 75f4 .....*......)Ju.
00000010: c3 .
Listing:
B1 0A MOV CL, 10 ; repeat '*' 10 times per line
8B D1 MOV DX, CX ; counter for 10 line loop
LINE_LOOP:
B8 0A2A MOV AX, 0A2AH ; AL = '*', AH = 0AH
CD 10 INT 10H ; print '*' 10 times
88 C8 MOV AL, CL ; AL = LF char (0xA)
CD 29 INT 29H ; write to screen
4A DEC DX ; dec counter
75 F4 JNZ LINE_LOOP ; loop for 10 lines
C3 RET ; return to DOS
Uses PC BIOS INT 10H function 0AH (write char at current position CX number of times) for each row. Since this function doesn't actually advance the cursor only a line feed/LF (0xA) char is needed to move to the next line.
Marbelous, 81 bytes
@0
0A
>0\/
--
&0@1
&10B
@0&0
@1/\@2
@3@2
--/\\\..@4
>0&1&1/\&2
&2\/--@4/\s*
@3
:s*
2A
{0
Marbelous is a language based on marble machines
this program is composed of 4 subparts :
the main loop
a while loop going from 10 to 0, realease &0, and wait for &1 to be released before continuing
@0
0A
>0 \/
--
&0
&1
@0
the 11(0B) generator
a structure sending 11 (0B) to the portal @2 when the synchroniser group &0 is released
.. @1
.. 0B
.. &0
@1 /\ @2
the printer
a while loop waiting for something in @2 it then print that value minus 1 asterisk finish by printing the ascii value of @2-1 (which is 10(\n) here) and release synchroniser &1
@3 @2
-- /\ \\ .. @4
>0 &1 &1 /\ &2
&2 \/ -- @4 /\ s*
@3
asterisk creator
board transforming the inputted marble into a 2A (ascii value of *)
:s*
2A
{0
used language built-in are :
..is a noop00-FFinitiate a marble with this value@n(nfrom0toZ) is a portal which teleport the marble to another portal with the same value&n(nfrom0toZ) is a synchroniser, hold the marble until all corresponding synchroniser (samen) are full\/is a trash can/\create a duplicate passing marble to it's left and right- marbles going out of the machine from the bottom are implicitly outputed
--is a decrement\\is a right deflector, the marble go right>n(nfrom0toZ) is a conditional,if marble > n then noop else go right
boards
it also uses a board, boards are created with :name at the start of a new line with name being anything you want, they have special built-in
}n(nfrom0toZ) input argument{n(nfrom0toZ) returned output
Boards execution pause the caller execution until finished
Cubix, 26 bytes
'*u.NNw\./>rroq(?;(?@....N
This maps onto a side length 3 cube. Now to try and get rid of some of the no-ops and try and fit it on a side length 2 cube.
' * u
. N N
w \ .
/ > r r o q ( ? ; ( ? @
. . . . N . . . . . . .
. . . . . . . . . . . .
. . .
. . .
. . .
/Redirect the flow to the top face'*uAdd an * to the stack and u-turnNNAdd a couple of 10's to the stack as counters>rroqRotate the stack to bring the * to the top, output and push it to the bottom(?Decrement the top counter (character) and test.- If zero
;(pop from stack, decrement next counter (line), otherwise go around to previous command set. ?@Test the counter (line) and exit if zeroNo\wAdd a 10 to the stack as a linefeed and a new character counter, output it and redirect back to the>to start the sequence again.
Check, 15 bytes
"*">10:r*R]+R*o
Pushes the string * and repeats it ten times, while also storing 10 in the register. Then adds 10 to the end of the string (a newline), then repeats the whole thing 10 times.
Charcoal, 4 bytes
G+α*
The code translates as: draw a filled polygon (G); give it four equal sides going in the four cardinal directions (+); each side should be 10 characters (α, a variable preinitialized to 10); use asterisks (*).
JAISBaL 3.0.1, 9 bytes
h**A10«
Verbose:
# \# enable verbose parsing #\
ten \# [0] push ten onto the stack #\
push1 * \# [1] push * onto the stack #\
mul \# [2] multiply the top two values of the stack #\
dupmany 10 \# [3] duplicate the top value of the stack 10 times #\
popoutallln \# [4] pop off every value in the stack and print each one with a new line #\
Conventional 10 byte version (using actual for loops):
˖˖S*˄P
Verbose:
# \# enable verbose parsing #\
ten \# [0] push ten onto the stack #\
for \# [1] start for loop #\
ten \# [2] push ten onto the stack #\
for \# [3] start for loop #\
print1 * \# [4] print * #\
end \# [5] end current language construct #\
ln \# [6] print a new line #\
Braingolf, 18 bytes
8V9R#*[.]#
[R&!@v]
Explanation:
8V9R#*[.]#\n[R&!@v]
8 Push 8
V Create stack2 and switch to it
9 Push 9
R Return to stack1
#* Push codepoint of *
[.] Do-while loop, will run 9 times due to the 8 pushed at the start
. Duplicate last item on stack
#\n Push codepoint of newline
[R...v] Do-while loop, uses stack2 for loop counting
Will run 10 times due to the 9 pushed at the start
&!@ Print entire stack1 without popping
PyMin, 14 bytes / 10 characters
»("*"Ҁ+ѿ)Ҁ
Shorter version with v0.5:
13 bytes / 9 characters:
»("*"ҀƜ)Ҁ
Flurry, 76 bytes
({<(<({})(<({}){}>){}>){}>}){(({}){(){}(((<><<>()>){})[{}{<({}){}>}])}{})}{}
Can be run with the interpreter as follows:
$ ./Flurry -bnn -c "$pgm"
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Explanation
A function that composes two functions (or multiplies two numbers):
comp = λf g x. f (g x)
= λf g x. K f x (g x)
= λf g x. S (K f) g x
= λf. S (K f)
= S ∘ K
:= <<>()>
A function that increments a number by one:
succ = λn f x. f (n f x)
= λn f. comp f (n f)
= λn f. S comp n f
= S comp
:= <><<>()>
A function that computes n(n + 1):
oblong = λn. n * succ n
= λn. comp n [succ n]
= λn. S comp succ n
= succ succ
:= <><<>()> [<><<>()]
:= (<><<>()>) {}
The number two:
2 = λf x. f (f x)
= λf. <f f>
:= {<({}){}>}
The number six:
6 = 2 * 3
= 2 * succ 2
= oblong 2
:= oblong {<({}){}>}
:= (<><<>()>){} {<({}){}>}
The number 42 (ASCII value of *):
42 = 6 * 7
= 6 * succ 6
= oblong 6
= oblong (oblong 2)
:= (oblong) [{} 2]
:= ((<><<>()>){}) [{} 2]
:= ((<><<>()>){}) [{} {<({}){}>}]
The number 10:
10 = λf x. f (f (f (f (f (f (f (f (f (f x)))))))))
= λf. f ∘ f ∘ f ∘ f ∘ f ∘ f ∘ f ∘ f ∘ f ∘ f
= λf. push (f ∘ f ∘ f ∘ f ∘ f) ∘ pop
= λf. push (f ∘ push (f ∘ f) ∘ pop) ∘ pop
= λf. push (push f ∘ push (push pop ∘ pop) ∘ pop) ∘ pop
:= {< ( < ({}) ( < ({}) {}>) {}>) {}>}
:= {<(<({})(<({}){}>){}>){}>}
A function that pushes 42 to the stack and returns its argument:
push_star = λx. (push 42; x)
= λx. K x (push 42)
:= {() {} (42)}
:= {() {} (((<><<>()>){})[{}{<({}){}>}])}
A function that takes the number 10 and then pushes ten copies of 42, followed by 10, and returns 10:
push_row = λn. push (n push_star n)
:= { (({}) push_star {}) }
:= { (({}) {(){}(((<><<>()>){})[{}{<({}){}>}])} {}) }
Applying push_row 10 times to the number 10:
main () = 10 push_row 10
= (push 10) push_row pop
:= (10) push_row {}
:= ({<(<({})(<({}){}>){}>){}>}){(({}){(){}(((<><<>()>){})[{}{<({}){}>}])}{})}{}
Mornington Crescent, 1940 bytes
Take Northern Line to Euston
Take Victoria Line to Seven Sisters
Take Victoria Line to Euston
Take Victoria Line to Euston
Take Northern Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Bank
Take Circle Line to Bank
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Paddington
Take District Line to Acton Town
Take Piccadilly Line to Heathrow Terminal 5
Take Piccadilly Line to Acton Town
Take District Line to Acton Town
Take District Line to Parsons Green
Take District Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Bank
Take Circle Line to Bank
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Bakerloo Line to Paddington
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Bank
Take Circle Line to Bank
Take Northern Line to Mornington Crescent
// "*" = 42 = 6*7
// get 7
Take Northern Line to Euston
Take Victoria Line to Seven Sisters
// copy it
Take Victoria Line to Euston
Take Victoria Line to Euston
Take Northern Line to Bank
// add it until 42
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
// get char "*"
Take District Line to Bank
Take Circle Line to Bank
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
// concatenate it (shorter than with loop)
Take Northern Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Paddington
// calculate a 10 for newline
// get 5 from Heathrow Terminal 5
Take District Line to Acton Town
Take Piccadilly Line to Heathrow Terminal 5
Take Piccadilly Line to Acton Town
Take District Line to Acton Town
Take District Line to Parsons Green
// add 5 + 5
Take District Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
// get char "\n"
Take District Line to Bank
Take Circle Line to Bank
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
// concatenate it with asterisks
Take Bakerloo Line to Paddington
// copy them
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Paddington
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Paddington
Take Circle Line to Hammersmith
Take Circle Line to Paddington
// go home and print
Take Circle Line to Bank
Take Circle Line to Bank
Take Northern Line to Mornington Crescent
MAWP, 23 bytes
25W[25W[67W;1A]%52W;1A]
Two nested loops doing almost the same thing
MAWP 2.0, 20 bytes
10[10["*":1-]`10;1-]
Basically the same thing
GolfScript, 10 bytes
10."*"*n+*
10. # Puts 10 on the stack and makes a copy of it
"*"* # Puts the asterisk on the stack and multiplies it by the 10 to get "**********"
n+ # Adds a newline to the string
* # Multiplies by that first 10
Desmos, 30 bytes
29sign(mod([1,...,110],11))+13
Desmos doesn't have string support, so instead we output a list of 110 character codes. If you don't want a trailing newline, you can change the 110 to a 109 with no issues. Desmos also doesn't support loops properly, but if you apply operations to arrays, it applies them to each element in the array. Explanation:
[1,...,110] Generate array containing numbers 1 to 110
mod( ,11) Find index mod 11 (0 corresponds to end of row)
sign( ) Coerce to 0/1 instead of 0/1/2/...
29 +13 Convert 0s to 13s (\n in ASCII) and 1s to 42s (* in ASCII)
Rust, 39 bytes
||for _ in 0..10{print!("{:*>11}","
")}
This uses * as a fill character to pad a newline. The result is printed 10 times.
Rockstar, 53 51 41 37 35 bytes
X's10
while X
say "*"*10
let X be-1
Try it here (Code will need to be pasted in)
Rutger, 64 bytes
r=Repeat["*"];
o=Concat[r[10]];
o=Repeat[o["\n"]];
Print[o[10]];
Kinda self-explanatory, I hope.
Pip -l, 5 bytes
'*MCt
Four years ago, I wrote a 7-byte Pip solution and said, "Kinda disappointed that the simple way was the shortest." Fear not, previous me: It's not the shortest anymore!
(Though technically, given our current consensus about flags, Pip and Pip -l aren't the same language... oh, whatever.)
Explanation
t Variable, preset to 10
MC Take that as the size of a grid of coordinate pairs and map a function to each pair
'* Given a value rather than a function, MC puts that value at every location instead
The result is a list of 10-element lists of asterisks, which we autoprint with
every sublist on a new line thanks to the -l flag
INTERCAL, 197 185 bytes
DO,1<-#11DO,1SUB#1<-#172DO,1SUB#11<-#260PLEASEREADOUT,1DO,1SUB#1<-#252PLEASEREADOUT,1DOREADOUT,1DOREADOUT,1DOREADOUT,1DOREADOUT,1DOREADOUT,1DOREADOUT,1DOREADOUT,1DOREADOUT,1PLEASEGIVEUP
Looping is ~120 bytes longer...
Fills an array with tape instructions for one line, prints that, overwrites the first instruction with a new one relative to the new tape position, prints that nine more times.
EDIT
I used one PLEASE too much, also READ OUT and GIVE UP don't require a DO between the PLEASE and themselves, saving some bytes.
JavaScript (V8), 52 bytes
console.log((f=(c,i=10)=>i?c+f(c,--i):'\n')(f('*')))
JavaScript (V8), 45 bytes
console.log((f=c=>c.repeat(10))(f('*')+'\n'))
JavaScript (V8), 45 bytes
console.log(('*'.repeat(10)+'\n').repeat(10))
1+, 256 255 64 61 59 56 50 48 bytes
10
42
..(|(A|";";";";";)(A)^";^)(B|()()())(B)(B)
I'm lazy. Pushes a newline and an asterisk, then simply output them, without any tricks. No loops because creating terminating loops in 1+ is painful.
EDIT: -1 byte by reusing the constant 2.
EDIT: -191 bytes by using functions.
EDIT: -3 bytes by using another function.
EDIT: -2 bytes using one more function.
EDIT: -3 bytes.
EDIT: -6 bytes, although it probably doesn't quite follow the rules. It outputs number: followed by the correct output, but number: is a input prompt. If the input prompt have to be counted as output, then all answers with input is invalid as well.
This exploits a weird behaviour of the interpreter. When run in TIO with argument .input.tio, it reads from the input for the program source code and reads from the input again for the program input. So, yeah, the source code is fed into the input itself. 42 is a nope NOP because the only number literal 1+ recognises is 1. . pushes the input as an integer, which is 42.
If the character was something other than * it can be 46 bytes, by reading a character, not integer (* cannot precede the program due to the empty stack)
This will be completely valid after TwilightSparkle Edition is out. (TSE have a "-o" command line option that runs the original interpreter, except there are no prompts.)
EDIT: -2 bytes. Same trick with 10.
Integral, 6 Bytes
v*)f)☼
Explanation
v* "*"
) Push 10
f Repeat string 10 times
)☼ Push 10 copies onto the stack
Stack is joined with newlines & implicitly outputted
CSS, 157 109 bytes
Inspired by hd answer, probably 1:1 reproduced from OP question (except background color) - pure CSS solution (no additional HTML)
body:after,body:before{white-space:pre;content:'**********\A**********\A**********\A**********\A**********\A'
Set, 79 bytes
set A (A+1)
set ! 42
[A/K] set ? 1
set A 65
set B (B+1)
set ! 10
[B/L] set ? 1
There's a newline at the start.
Scratch 3.0, 4 blocks/65 bytes
SB Syntax:
when gf clicked
delete all of[o v
repeat(10
add[**********]to[o v
Picture:
I'm quite proud of the block count here, because it matches the byte counts of the winning answers. But SB Syntax ruined things for me. (´• ╭╮ •`)
W d, 7 4 bytes
°♣∩x
Uncompressed
T:s*E
Explanation
T % Push a 10 onto the stack
: % Copy the top of stack
s* % Generate 10 asterisks
E % Foreach in the range 1 .. 10,
% Print 10 asterisks following a newline
Ruby, 15 bytes
puts [?**10]*10
Prints a trailing newline.
?* is the single character *
Explanation
puts [?**10]*10
?* : literal '*' string
*10 : repeated 10 times ('**********')
[ ] : as an element in an array
*10 : which is also repeated 10 times
puts : prints each element of the array appended with a newline.
Rust, 49 bytes
fn main(){print!("{}","**********\n".repeat(10))}
My first code golf answer!
JAPT, 12 bytes
'*
pA)+R
VpA
Japt sets vars automatically, so '* sets U to "*"
pA)+R prints U out A(10) times. And adds a new line (+R). All this is set to V.
VpA prints V out A times
In Regular JS is
U = "*";
V = (U.p(A)) + R;
V.p(A)
APL (Dyalog Classic), 11 bytes
⎕←10 10⍴'*'
Explanation
⎕← ⍝ Output
10 10⍴'*' ⍝ The asterisk reshaped into a 10 by 10 grid
PHP, 26 bytes
Just used a compressed string. Has raw output of gzdeflate and contains unprintable binary data, so the code itself and direct TIO link cannot be posted here, but here is a hex dump of it:
000000 3c 3f 3d 67 7a 69 6e 66 6c 61 74 65 28 22 d3 d2 <?=gzinflate("..
000010 82 01 2e 2d 9a 33 01 22 29 3b ...-.3.");
Save it as a binary file then execute it like this: php asterisks.php
TIO which uses bash to run this file: Try it online!
Python 3, 23 bytes
print(10*(10*"*"+"\n"))
In this case, the obvious answer is best. I tried some other ways, but all were equal or longer in length.
Let me know if you have any answers to add.
23 bytes (alternative)
print(10*f"{10*'*'}\n")
24 bytes
print(10*"**********\n")
25 bytes
exec(10*"print(10*'*');")
29 bytes
print("\n".join(10*[10*"*"]))
32 bytes
for _ in range(10):print(10*"*")
43 bytes
print(*(10*"*"for _ in range(10)),sep="\n")
Keg, 10 bytes
(
|(
|\*)
)
Explanation
(\n| Start for loop iterating 10 times
(\n| Start for loop iterating 10 times
\* Push an asterisk
) End loop
\n Push a newline
MathGolf, 7 bytes
♂⌂*n+♂*
Explanation
♂⌂* Push asterisk multiplied by 10("**********")
n Append a newline
+ Concatenate the two strings
♂* Multiply the string by 10
implicit output
Forth (gforth), 36 34 bytes
: f 9 for ." **********" cr next ;
-2 bytes thanks to @bubbler
Explanation
10 0 \ put 10 and 0 on the stack
do \ begin a loop from 0 to 10 (0 inclusive 10 exclusive)
." **********" \ print the string literal ********** (the initial space is required because forth words are space separated, and ." is not an exception)
cr \ print out a new line character
loop \ end the loop
Perl 5, 18 Bytes
say'*'x10for 1..10
Requires the -E flags, as in:
perl -E "say'*'x10for 1..10"
Excel VBA, 11 Bytes
Anonymous VBE immediate window function that outputs a 10x10 grid of * to the ActiveSheet object
[A1:J10]="*
C# (.NET Core), 53 bytes
Brand new to code golf, is this type of format allowed to be used (Usage of the header section / footer section)?
for(int i=0;i<10;i++){Console.Write("**********\n");}
Gol><>, 9 bytes
aFa:R`*|H
There is a trailing newline, but the specs say it is okay. Below is a version that doesn't have a trailing new line, but adds on 2 extra bytes.
aFaR`*a|~rH
R 33 bytes
cat(rep('**********',10),sep='
')
I believe this is shorter than the other R answers on this question.
Premier, 8 bytes
'*U*N+U*
The boring way.
Explanation
'*U*N+U* full program
'* push "*"
U push 10
* repeat
N+ append newline
U push 10
* repeat
Premier, 14 bytes
QnN
**********
Try it online! This second approach uses Premier's implicit data iteration. It iterates over each character in the data (the second line), and executes the program (the first line) for each character. The data QnN pushes the data (Q), outputs it (n), then pushes a newline (N), to be implicitly outputted. This iterates 10 times, printing a 10x10 grid of asterisks.
Pascal (FPC), 57 bytes
var i:word;begin for i:=0to 9do writeln('**********')end.
This is probably the best one as I don't see how this can be improved in 9 characters or less which could be gained by removing *s.
A0A0, 145 bytes
A0A0
A0C3G1G1G1G1G1G1G1G1G1G1G1A0
A0P42P42P42P42P42P42P42P42P42P42G3P10A0
A0A1G-3G-3G-3G-3G-3G-3G-3G-3G-3G-3G-3A0
G-3
G-2G-2G-2G-2G-2G-2G-2G-2G-2
The top five lines are for the loop construction. A0A0 deletes instructions whenever it runs them, so those lines ensure that the loop keeps running. On line 3 are ten P42 instructions which print * (42 is the ascii code for an asterisk). The P10 instruction prints a new line.
The bottom line acts as a counter. For every execution of the loop it jumps to there and then jumps back to the loop. This consumes an instruction on that line. There are exactly nine instructions, so when it tries to go there when it has already printed ten lines the program will halt execution (since an empty line swill stop execution in A0A0).
ESOPUNK, 167 78 77 bytes
MARK L
@REP 10
COPY 42 #STDO
@END
COPY 10 #STDO
TEST X = 9
ADDI X 1 X
FJMP L
I haven't been bothered to implement the preprocessor, but this should work when I do.
MBASIC, 32 bytes
1 WIDTH 10:PRINT STRING$(100,42)
RUN
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
No loop. Just printing 100 asterisks into a 10 character wide terminal to force line wraps.
There's no MBASIC on TIO, so I've linked the reference manual.
q, 12 bytes
10 10#get"*" / a 10x10 matrix
Shakespeare Programming Language, 387 bytes
,.Ajax,.Ford,.Act I:.Scene I:.[Exeunt][Enter Ajax and Ford]Ford:You be twice the sum ofa cat twice twice the sum ofa cat a big big cat.Speak thy.Speak thy.Speak thy.Speak thy.Speak thy.Speak thy.Speak thy.Speak thy.Speak thy.Speak thy.You be twice the sum ofa cat a big big cat.Speak thy.Ajax:You be the sum ofyou a cat.Be you nicer the sum ofa cat a big big big cat?If notlet usScene I.
ORK, 185 bytes
When this program starts:
I have a scribe called W
W is to write "**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********"
ORK does everything (even I/O and basic math) with objects. As far as this question goes, looping does not have to be one of them.
MathGolf, 6 bytes
⌂♀*♂/n
Explanation
⌂ Push "*"
♀* Multiply by 100
♂/ Divide into chunks of 10
n Join with newline
With an output control flag this could be 5 bytes, but I don't have that yet.
Backhand, 28 bytes
aH~0}|{:& [a ^v&v"*******" ^
It may seem weird that the quotes only contain 7 asterisks, but there's a reason for it.
Explanation:
Note that the pointer usually moves in steps of 3
a Push 10 as the counter
0 |{ Push 0 to not get reflected and enter the loop
& Store the counter in the register
a Push a newline
v v Decrease the step value to 1
"*******" Push 7 asterisks
^ Increase the step value to 2 and reflect
" * * * " Push 3 asterisks
& Restore the counter
^ Increase the step counter to 3
[ Decrement the counter
: Duplicate the counter
}| Repeat the loop if the counter is not zero
~ Otherwise, pop the excess copy of the counter
H And terminate, printing the contents of the stack
Z80Golf, 14 bytes
00000000: 0a4f 3e2a 46ff 10fd 7eff 0d20 f576 .O>*F...~.. .v
Disassembly
start:
ld a, (bc) ; 0a
ld c, a ; 4f
loop1:
ld a, '*' ; 3e 2a
ld b, (hl) ; 46
loop2:
rst $38 ; ff
djnz loop2 ; 10 fd
ld a, (hl) ; 7e
rst $38 ; ff
dec c ; 0d
jr nz, loop1 ; 20 f5
halt ; 76
Golfing nested loops
Since a is the parameter to putchar, I used b and c for loop counters. The loop constructs are
ld b, ... ; 1 or 2 bytes
loop:
(loop content)
djnz loop ; 2 bytes
and
ld c, ... ; 1 or 2 bytes
loop:
(loop content)
dec c ; 1 bytes
jr nz, loop ; 2 bytes
This combination of 2-level nested loops is optimal in Z80Golf.
Reusing the first instruction as data
The first byte 0a is located at memory address $0000. Since hl is always zero in this program, we can use the one-byte instruction ld r, (hl) whenever we need the constant 0a, instead of the two-byte ld r, $0a.
In this particular challenge, the byte $0a has three uses: the outer loop, the inner loop, and the newline character. The byte as an instruction is not particularly useful, so we save two bytes here.
Java (OpenJDK 8), 61 bytes
static{for(int i=0;i++<10;)System.out.println("**********");}
Powershell, 12 bytes
@('*'*10)*10
Explanation
'*'*10 create a string with 10 '*'
@('*'*10) create an array with one element of string with 10 '*'
@('*'*10)*10 repeat elements of this array 10 times
Haskell, 34 bytes
putStr$[0..9]>>([0..9]>>"*")++"\n"
λ> putStr$[0..9]>>([0..9]>>"*")++"\n"
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Bash + coreutils, 19 bytes
I prefer to repeat stuff in Bash using 'yes'.
yes **********|head
I saved 2 bytes by @Neil's suggestion. But when the directory where you are running this command does not only contain files starting with a '.' dot you need to enclose the stars * with ".
Bash + coreutils, 21 bytes
yes "**********"|head
Q'Nial7, 15 bytes
10 10reshape'*' #create atom '*', reshape to 10 by 10 matrix
Python 2, 20 bytes
print("*"*10+"\n")*10
I didn't know you could remove the space between print and the string.
Glee, 17 bytes
('*'%%10\)%%10,,\
Explanation:
('*' create '*'
%%10 reshape to length 10
\) monadic segment with CRLF
%%10 reshape to sequence length 10
,,\ expose with LF separators
PHP, 60 45 Bytes
Try it online (original answer)
Try it online (saved 15 Bytes thanks to @Titus)
Code (Original)
<?=strtr(str_repeat(base_convert("1ku",36,2),10),["
","*"]);
Code (Titus suggestions)
<?=strtr(str_repeat(11111111110,10),10,"*\n");
About the edit
The change is, using str_repeat(base_convert("1ku",36,10),10) actually uses more bytes than str_repeat(11111111110,10) and the use of string for replacements on strtr instead of an array.
Explanation, Why "1ku"?`
The solution is repeat the string "**********", lets take the base 2 number 11111111110
base 10 = 2046
base 2 = 11111111110
base 36 = 1ku
Basically is repeat a compressed string, and with strtr replace each 1 with a "*" and 0 with a \n
Prolog (SWI), 62 59 55 54 bytes
t.
b:-between(0,9,_).
?-b,(b,write(*),1=0;t),nl,1=0;t.
C, gcc 36 bytes
recursive solution. One downside is you need to pass 2 when you call the function to get 10 rows.
f(a){a<puts("**********")?f(a+1):0;}
This alternative addresses that issue and you don't have to call the function from main since main is now the recursive function:
main(a){a<puts("**********")-1?main(a+1):0;}
gcc also resolves #include "stdio.h" missing and variable a is implicitly set to an int and initialized to 0.
Kotlin (script), 32 bytes
print("**********\n".repeat(10))
Run this locally as a standalone program by
- installing Kotlin
- saving the source to a
.ktsfile - run with
kotlinc -script myfile.kts
This does not seem to work on TIO, for whatever reason, which is why I had to include the header/footer.
Charm, 50 bytes
f := 10 repeat i
[ [ " * " pstring ] f newline ] f
Funnily enough, this doesn't use loops at all, just repeated code.
Whitespace, 91 bytes
[S S S T T S S T S S N
_Push_100][N
S S N
_Create_Label_LOOP][S S S T N
_Push_1][T S S T _Subtract][S N
S _Duplicate][N
T T S N
_If_negative_Jump_to_Label_EXIT][S S S T S T S T S N
_Push_42_*][T N
S S _Print_as_character][S N
S _Duplicate][S S S T S T S N
_Push_10][T S T T _Modulo][N
T S T N
_If_0_Jump_to_Label_NEWLINE][N
S N
N
_Jump_to_Label_LOOP][N
S S T N
_Create_Label_NEWLINE][S S S T S T S N
_Push_10][T N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]
Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Explanation in pseudo-code:
Integer i = 100
Start LOOP:
i = i - 1
If(i < 0)
Exit program
Print "*"
If(i modulo-10 == 0)
Print new-line
Go to next iteration of LOOP
Japt -R, 5 bytes
AÆAç*
Unpacked & How it works
Ao@Aç*
Ao@ Map range(10) with a function that returns...
Aç* "*" repeated 10 times.
`-R` flag joins the result array with "\n"
Implicit output
Javascript (REPL), 27 bytes, Old is 32 bytes. Thanks to @Peter
('**********\n').repeat(10)
Canvas, 5 bytes
*A×A*
With notes (not valid code, as Canvas does not support comments):
Print the following (implicit)
* The string "*"
A× Duplicated 10 times horizontally
A* Duplicated 10 times vertically
Julia, 23 bytes
print(("*"^10*"\n")^10)
Explanation:
print( ) # Print
( ) # A string consisting of
"*"^10 # "*" duplicated 10 times
*"\n" # then concatenated to a newline
^10 # which is then duplicated 10 times
Python 3, 43 34 31 28 bytes
for i in[1]*10:print(10*'*')
Saved 9 bytes thanks to Simon
Saved 3 bytes thanks to Wheat Wizard
Just sprints ten asterisks and in a loop.
Micrsocript II, 13 bytes
{"*"s10*P}s9*
Wumpus, 22 bytes
)"*"9&=l(&o
}@?!-)9=N}
Explanation:
) increment the counter
"*" push an asterisk to the stack
9&= Duplicate it 9 times (leaving 10 copies)
l(&o Print length of stack-1 times
Reflect off the end of the line and go South-West
} Turn right by 60 degrees, now going West along the second line
N Print a newline
= Duplicate the counter
!-)9 Check if it is equal to 10
@? If so, end the program
} Else turn right and go back to the start of the first line
Momema, 44 bytes
a000b0-9 42 0+1*0b=+-10*0-9 10 1+1*1a=+-10*1
Explanation
# b = 0
a 0 # label a0: jump past label a0 (no-op) # do {
0 0 # [0] = 0 # a = 0
b 0 # label b0: jump past label b0 (no-op) # do {
-9 42 # output chr 42 # print '*'
0 +1*0 # [0] = 1 + [0] # a += 1
b =+-10*0 # label b1: jump past label b((1 + !!([0] - 10)) % 2) # } while (a - 10 != 0)
-9 10 # output chr 10 # print '\n'
1 +1*1 # [1] = 1 + [1] # b += 1
a =+-10*1 # label a1: jump past label a((1 + !!([1] - 10)) % 2) # } while (b - 10 != 0)
Thue, 30 bytes
%::=~**********
::=
%%%%%%%%%%
Thue, 53 bytes
%::=,*,*
>*::=>[
>,::=>]]
[::=~
]::=~*****
::=
>%%%%%
Uses the convention that "when a string is sent to the output stream, no newline is printed at the end, except if the string is empty, in which case a newline is all that is printed." This is not followed by the TIO interpreter.
JVM Bytecode, 309 bytes
Hexdump output because the entire file is hex:
00000000 ca fe ba be 00 03 00 2d 00 15 01 00 16 28 5b 4c |.......-.....([L|
00000010 6a 61 76 61 2f 6c 61 6e 67 2f 53 74 72 69 6e 67 |java/lang/String|
00000020 3b 29 56 01 00 08 74 6f 53 74 64 6f 75 74 07 00 |;)V...toStdout..|
00000030 13 07 00 0c 01 00 26 28 4c 6a 61 76 61 2f 6c 61 |......&(Ljava/la|
00000040 6e 67 2f 53 74 72 69 6e 67 3b 29 4c 6a 61 76 61 |ng/String;)Ljava|
00000050 2f 6c 61 6e 67 2f 53 74 72 69 6e 67 3b 01 00 06 |/lang/String;...|
00000060 63 6f 6e 63 61 74 01 00 04 43 6f 64 65 01 00 04 |concat...Code...|
00000070 6d 61 69 6e 01 00 0a 53 6f 75 72 63 65 46 69 6c |main...SourceFil|
00000080 65 0c 00 06 00 05 0c 00 02 00 12 01 00 10 6a 61 |e.............ja|
00000090 76 61 2f 6c 61 6e 67 2f 53 74 72 69 6e 67 0a 00 |va/lang/String..|
000000a0 03 00 0b 01 00 0b 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |......**********|
000000b0 0a 08 00 0e 0a 00 04 00 0a 07 00 07 01 00 15 28 |...............(|
000000c0 4c 6a 61 76 61 2f 6c 61 6e 67 2f 53 74 72 69 6e |Ljava/lang/Strin|
000000d0 67 3b 29 56 01 00 15 73 75 6e 2f 6d 69 73 63 2f |g;)V...sun/misc/|
000000e0 4d 65 73 73 61 67 65 55 74 69 6c 73 01 00 00 00 |MessageUtils....|
000000f0 20 00 11 00 03 00 00 00 00 00 01 00 09 00 08 00 | ...............|
00000100 01 00 01 00 07 00 00 00 22 00 03 00 01 00 00 00 |........".......|
00000110 16 12 0f 59 b6 00 10 59 59 b6 00 10 59 b6 00 10 |...Y...YY...Y...|
00000120 b6 00 10 b8 00 0d b1 00 00 00 00 00 01 00 09 00 |................|
00000130 00 00 02 00 14 |.....|
00000135
To minimize size, I:
- Used the classs name "Code" to avoid putting another entry into the constant table
Set the SourceFile to an empty string
Used sun.misc.MessageUtils.toStdout() rather than System.out.println() to avoid an extra get static instruction, which also let me avoid having to juggle to keep it on the stack
- Used exponentially growing dups and String.concat() rather than having a loop
- Extended the class from sun.misc.MessageUtils to avoid having an entry for java.lang.Object on the stack
The jasmin assembler code used to generate this class is:
.source ""
.class Code
.super sun/misc/MessageUtils
.method public static main([Ljava/lang/String;)V
.limit stack 3
ldc "**********\n"
dup
invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
dup
dup
invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
dup
invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
invokestatic sun/misc/MessageUtils/toStdout(Ljava/lang/String;)V
return
.end method
and the CFR decompiler output for this class is:
/*
* Decompiled with CFR 0_125.
*/
import sun.misc.MessageUtils;
class Code
extends MessageUtils {
public static void main(String[] arrstring) {
String string = "**********\n".concat("**********\n");
String string2 = string.concat(string);
MessageUtils.toStdout(string.concat(string2.concat(string2)));
}
}
TSQL, 24bytes
PRINT'**********'
GO 10
My first submission, please be kind with any help :)
Lost, 152 116 114 105 95 91 60 57 54 bytes
66 bytes saved thanks to Jo King
v%<@(<<<<<<<<<<<<<<
\?\<>"**********h^"
/<>9v+^?:)-1+-
This program is unbelievably convoluted. I might explain it when I finished golfing it. For now here is a rough overview.
Explanations
To the left we have
v%
\?\<
which catches and cleans the ip. It exits when ? fails to jump over \ pushing the ip down to
(
>
>9v
which puts a counter set at 9 into the scope.
Then we push the string "**********h^". The ip wraps around to the other side and back down onto the next line moving backwards. The +- combines the last two characters to turn the h^ to a newline.
From here +^?:)-1 subtracts one from the counter or deflects the counter up to the top row if it is already zero. On its way to the top row * combines the two junk values we have lying around once on the top row we get rid of the last value with ( and exit with @.
FALSE, 34 33 26 23 bytes
11[1-$]["**********
"]#
Kotlin, 41 bytes
Submission
fun f()=(0..9).map{println("**********")}
Test
fun f()=(0..9).map{println("**********")}
fun main(args: Array<String>) {
f()
}
TryItOnline
dc, 41 bytes
[1-d0!>C]sR[42Pd10%0=NlRx]sC[10P]sN100lRx
I know there's dc answer, just wanna do it without dumping stack)
Befunge-98, 19 15 bytes
a1_@#:-,ka:k8*'
First time using 98 instead of 93. Both the k and ' commands are immensely useful.
Lua, 34 bytes
for i=1,10 do print"**********"end
TSQL, 45 bytes
SELECT TOP 10 REPLICATE('*',10) FROM systypes
Above query use TSQL REPLICATE function to replicate * 10 times and systypes is a system view in SQL Server which list out system specified and user defined data types.
Try it here
This is my answer on Code Golf and I hope I am doing it correctly.
Befunge, 33 bytes
55+:v
_v#:<,"*"-1
^_1-:!#@_55+:,1
How it works
55+:v
....<... Initialises the stack with two 10s as counters.
........ The first is for the outer loop, and the second is the inner
.....
_v#:<... Checks whether the inner counter is 0
._......
..... If so, decrement the outer counter
_.......... If the outer counter is 0, exit the program
^_1-:!#@_55+:,1 Else print a newline and reset the outer loop counter
.....
.....,"*"-1 Else, decrement the inner counter and print an *
........... And run the inner loop again
ABCR, 36 bytes
)))))))BAAAAA4*xAb)))B(7OOOOOOOOOOP(x
Pushes 42 (the character code for *) to queue A, 10 (\n) to B, and then for each value from 9 to 0 print out ten copies of A as a character and one copy of B.
Symbolic Python, 41 bytes
_=-~(_==_)
_=_**-~_+_
_=("*"*_+"""
""")*_
Explanation
_=-~(_==_)sets the value of_toTrue, which is interchangeable with1_=_**-~_+_performs2**3+2, resulting in10, and stores this in_"*"*_constructs a row, and+"""\n"""appends a newline.- This is multiplied by
_, 10, to create the square. - At the end of execution, the value left in
_is printed.
Chef, 252 bytes
Was purely for fun trying to learn Chef.
a.
Ingredients.
42 b
10 c
10 d
13 e
Method.
Put e into mixing bowl.
F the c.
Put b into mixing bowl.
F the c until fed.
Liquefy contents of the mixing bowl.
G the d.
Pour contents of the mixing bowl into the baking dish.
G the d until ged.
Serves 1.
Google Sheets, 22 Bytes
Anonymous worksheet function that takes no input and outputs a 10 x 10 grid of *s to the calling worksheet cell.
=REPT("**********
",10
Crystal, 21 bytes
puts ("*"*10+"\n")*10
How does it work?
"*" * 10 = "**********"
"**********" + "\n" = "**********\n"
"**********\n" * 10 = "**********\n**********\n[...]"
Powershell, 78 bytes
$h=@();$v=@();1..10|% $_{$h+="*"};$i=0;Do{$v+=$h-join'';$i++}while($i-ne10);$v
Code explode:
$numbers = 1..10
$horArray = @()
$verArray = @()
Foreach ($number in $numbers){
$horArray += "*"
}
$i = 0
Do {
$verArray += $horArray -join ''
$i++
}
while ($i -ne 10)
$verArray
R: 33 bytes
write.matrix(matrix("*",10,10))
This does assume that you've loaded the MASS library.
S.I.L.O.S 45 bytes
All whitespace necessary due to my poor interpreter design.
a = 10
lbla
printLine **********
a - 1
if a a
Java 8, 73 62 bytes
o is a String passed to a Consumer
o->System.out.print("**********".replace("*", "**********\n"))
Hexagony, 37 35 34 31
10"+}(=${";<$<1}42/.0@_=<>\;>(_
Expanded:
1 0 " +
} ( = $ {
" ; < $ < 1
} 4 2 / . 0 @
_ = < > \ ;
> ( _ . .
. . . .
Basically just has two for loops counting down from ten to zero, printing out an asterisk on the inner loop, and a newline on the outer loop.
Explanation:
This program consists of three main parts: initialisation of memory, a loop which prints ten asterisks and a loop which prints a newline. The loop which prints a newline also contains the loop which prints the asterisks.
First, the code runs the totally linear memory initialisation. The code works out to be: 10"+}42. This sets the memory of the nearby edges to look like:
10 \ / 10
|
42
42 is the ASCII code for the asterisk character, and the two tens will be used as our loop counters. Of note is that the memory pointer is currently pointing away from the two tens, so moving backwards will put us on one of the tens.
Next, we start the astersisk printing loop. Linearly, the code looks like: ;".._(. This prints out an asterisk, moves the memory pointer backwards and to the left and finally decrements the value there. After one iteration, the memory would look like:
10 \ / 9
|
42
Then we hit the loop condition: the bottom-leftmost >. If the edge we just decremented is still positive we bounce around and execute a { to move us back onto the 42. Then we hit a $ and return to the beginning of the printing loop, the ;, by skipping the <. If the value was zero, we head into the other loop.
The outer loop begins by resetting the recently zeroed memory edge to ten (this is the 10 in the code, going southwest). Then, we print out this ten as an ASCII character, which is a newline. Next, we move onto the other memory edge and decrement it with {( and then execute what amounts to a bunch of noops: =${_=. Now, after one iteration of this loop, memory would look like:
9 \ / 10
|
42
This time, the memory is facing outwards from the edge storing a nine in the above diagram. Next we execute the < which acts as the loop condition for the outer loop. If the value was non-zero we bounce around off of some mirrors, then begin executing meaningful instructions again after entering the top of the hexagon at the " moving southwest. This causes us to move backwards and to the left, onto the 42 again, but facing inwards. Then the = flips our direction, resetting the state properly to begin the inner loop again. If the edge was set to zero, the instruction pointer goes on a little adventure which does nothing until it exits the program.
The adventure begins by the instruction pointer venturing northeast, perilously disregarding the safety of the cardinal directions. It bravely ignores a mirror that is aligned with its diretion (/) and heroically leaps off of a trampoline ($) entirely evading the deadly trap of another, totally identical trampoline. Staring out at the emptiness of uninitialised hexagon edges, the pointer, without faltering for a moment, adds the two blank edges it faces together, setting the current edge to their sum: 0 (the edge was actually zero beforehand, but the pointer likes to believe this was pretty important). Since the edge is zero, the pointer makes a left turn at the fork in the road, walking into a mysterious forest (of hexagons). There, it finds itself disoriented, moving forwards and backwards and forwards, until it winds up at the same place in memory as it started. Thinking that the problem must be that the current edge was set to zero last time, the pointer bravely plants a 1 into the current edge. Then, the noble pointer investigates another path, one laid with... a trap! The current edge is decremented and set back to zero! The pointer, dazed by the shocking turn of events, stumbles back into the trap setting the current edge to negative one. Infuriated, the pointer attempts to return to the comparatively pleasant forest, only to notice that since the current edge is not positive, the paths have yet again shifted and the pointer finds itself walking into a cave. And by a cave, I mean the mouth of a giant hexagonal worm. Helpless, the pointer curses the sexinity with its dying breath. Also, the program ends.
4, 56 bytes
4, 5, 6!
3.600426011060310604018016021080250010202049503101010494
For explanation see verbose mode in the tio link - quite straightforward initialization of cells and nested 10x10 loop.
Pyth, 6 bytes
Bet there's going to be a shorter Charcoal answer
VT*T"*
Explanation:
VT Ten times
*T"* Output ten asterisks followed by a newline
q/kdb+, 19 13 bytes
Solution:
-1(2#10)#"*";
Example:
q)-1(2#10)#"*";
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Explanation:
-1(2#10)#"*"; / solution
"*" / the asterisk
# / take or reshape
(2#10) / list (10;10), 10 rows, 10 columns
-1 ; / print to stdout
k, 12 bytes
`0:10 10#"*"
Explanation:
10 10#"*" /make 10 by 10 matrix of asterisk characters
`0: /output each row as a line
Javascript: 65 bytes
s="";for(i=1;i<=100;i++){s+="*";if(i%10==0)s+="\n"}console.log(s)
-- After it has been pointed out to me in the comments on the question, that we don't have to care about the dev-tools combining repeated output (as it can be turned off) I rewrote it as following
Javascript: 42 40 bytes
i=10;while(i--)console.log("**********")
(Saved 2 bytes thanks to @kamoroso94)
APL, 9 bytes
Works on all APLs ever made.
10 10⍴'*'
10 10 ten rows and ten column
⍴ cyclically repeating
'*' a star
Micro, 15 bytes
"*"10*10c+10*:/
C#, 96 bytes
static class P{static void Main(){for(int i=1;i<11;i++)System.Console.WriteLine("**********");}}
05AB1E, 7 bytes
'*т×Tô»
An alternate solution to the 05AB1E one already provided.
Explanation:
'*т×Tô»
'* Push an asterisk
т× Repeat the asterisk 100 times: "***********..."
Tô Split it into pieces of 10.
» Join with newlines.
Implicit print.
Common Lisp, SBCL, 39 38 35 32 31 29 28 bytes
(format t"~10{~10@{*~}
~}"1)
Ideas for improvement are welcomed.
~10{...~} ;loops 10 times, doing inside loop and printing newline
~10@{*~} ;loops 10 times, displaying ten "*"
R 34 bytes
While not being elegant at all, it makes what expected in not that many bytes...
cat(rep("**********",10),sep="\n")
OIL, 55 44 41 bytes, noncompeting
Annotated here for better understanding; remove everything after each # in each line to make it work.
**********# asterisk storage
10#if what's in
14#line 14 (marked with $)
1#is identical to 10 (line 1)
13#jump to line 13 (marked with &)
6#else to line 6; the next line
4#print what's in line 0; 10 asterisks
11#print a newline
8#increment line 14 (marked with $)
14
6#jump to the beginning (line '' == line 0)
3#exit &
0#counter $
MATLAB / Octave, 23 bytes
Code:
m=[eye(10) ''];m(:)='*'
Result:
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
OCTAVE, 36 bytes
strrep(num2str(ones(10,10)),"1","*")
Makes a 10 by 10 matrix of ones, converts these to strings and then changes the ones to *'s.
Google Sheets, 31 23 bytes
Code:
In cell A1 (12 bytes):
=REPT(B1,10)
In cell B1 (11 bytes):
********** # Contains New Line
# <--
Result:
Previous Attempt #1 (31 bytes):
=REPT(REPT("*",10)&CHAR(10),10)
Previous Attempt #2 (also 31 bytes):
=REPT("**********"&CHAR(10),10)
RProgN 2, 8 bytes, Noncompeting
Noncompeting because Language Postdates challenge
°{°`**}*
I decided to take another stab at this, with a much better version of RProgN.
Explained
°{°`**}*
° * # Run the contained function Ten (Which ° is a constant for) times.
{° *} # Repeat the referenced string 10 times.
`* # Asterisk Literal.
# This results in 10 strings of 10 `*`s on the stack, which prints as expected.
Brain-Flak, 77 bytes
(((()()()()()){})<>){({}<((((((((((<>(((({})<>)){}){}()()))))))))))>[()])}{}
The naive approach is 91 bytes:
((()()()()()){}){({}<((((((((((((((()()()){}()){})){}{}))))))))))((()()()()()){})>[()])}{}
But this approach holds an extra ten on the alternate stack to create large numbers easier. Unfortunately, since looping is so expensive in brain-flak, it's actually shorter to just push * 10 times directly rather then setting up a loop to do it.
I'm sure this could be made shorter.
Perl 6, 19 17 16 bytes
say '*'x 10 for ^10
put '*'x 10 for ^10
put('*'x 10)xx 10
put(\*x 10)xx 10
Explanation:
put( # print with trailing newline
'*' x 10 # 「*」 string repeated 10 times
) xx 10 # list repeat the above 10 times
Apparently \* or \(*) which is short for Whatever.new.list.Capture when coerced to a Str turns into just *.
Syms 1.3, 17 bytes (noncompeting)
{*}10;*{
}~+10;*>
Explanation:
{*}10;*{\n}~+10;*>
{*} Pushes "*"
10;* Repeats it 10 times.
{\n} Pushes \n.
~+ Adds it to the end of "*"*10.
10;* Repeats it 10 times.
> Outputs.
Python 3 (35 bytes)
for x in range(1,11):print("*"*10)
Syms, 24 bytes
{*}10;*[[[[[[[[[{~>[)}[)
The interpreter as provided errors immediately, but changing line 2 to if True: fixes it. (Is this allowed? Seems like it.)
Explanation:
{*}10;*[[[[[[[[[{~>[)}[)
{*} Add '*' to the stack.
10;* Repeat it 10 times.
[[[[[[[[[ Duplicate 9 times (there are now 10 copies on the stack)
{~>[)} Swap, output, duplicate, run (prints element below tos (top of stack) and then executes tos, stack is now (copies, this))
[) Duplicate and run (causes infinite loop, exits when '*'*10 copies run out)
Sinclair ZX81/Timex TS1000/1500
Simple enough I think
Method 1, 55 bytes (listing):
1 LET A=0
2 PRINT "**********"
3 LET A=A+1
4 GOTO 2+((A=9)*3)
Method 2, 30 bytes (listing)
1 FOR I=0 TO 9
2 PRINT "**********"
3 NEXT I
Z80 TI-83+, 53 bytes
.nolist
#include "ti83plus.inc"
#define ProgStart $9D95
.list
.org ProgStart - 2
.db t2ByteTok, tAsmCmp
bcall(_homeup)
ld A, 0
ld (PenCol), A
Do:
inc A
ld hl, msg
bcall(_PutS)
bcall(_NewLine)
cp 10
jr NZ, Do
ret
msg:
.db "**********", 0
.end
.end
Compiled with SPASM.
Japt, 9 bytes
Ao ç*pA)·
Test it online! This is, in fact, competing.
How it works
Ao ç*pA)· // Implicit: A = 10
Ao // Create the range [0..10).
ç*pA) // Fill with "*".repeat(A).
· // Join with newlines. Implicitly print.
QC 41 bytes
&FF002A2A2A2A2A2A2A2A2A2A0D0AFF##########
&FF00 Write hex to memory at address 00 until FF is reached
2A2A2A2A2A2A2A2A2A2A0D0AFF 10 asterisks with a new line and the terminator at the end
########## Print contents of memory 10 times until first 00 is reached
Could be made shorter if loops were used.
Perl, 22 bytes
print"**********\n"x10
C++ 83 bytes 82 Thanks to matthew roh!
#include <iostream>
int main(){for(int i;i++<10;){std::cout<<"**********"<<"\n";}}
Scala, 23 bytes
print(("*"*10+"\n")*10)
Almost the same as python solution.
8th, 28 bytes
( "*" 10 s:* . cr ) 10 times
QBIC, 18 bytes
[1,z:?@**********|
Explanation
`[` starts a for-loop
`@**********|` introduces the string literal "**********" and `?` prints it
`z` is short for 10
FOR-loops are auto-closed at the end of the program code.
If you'd like me to demonstrate more features of QBIC, upvote this: Showcase of Languages
QBIC's a work-in-progress. The current state would allow us to solve this in 15 bytes:
[|?@**********`
[ starts a FOR-loop, but the number of arguments is flexible. When | directly follows [, the FOR loop runs from 1 to 10. One argument makes it go from 1 to N, two args runs from M to N and three args introduces an increment:
[3,11,2| --> FOR a=3 TO 11 STEP 2 (or JS-style: for(a=3;a<11;a=a+2){} )
SmileBASIC, 19 bytes
?("*"*10+" "*40)*10
SB has a 50 character wide console, so printing 40 spaces after the 10 asterisks will bring the cursor to the beginning of the next line
Bash + coreutils + X11 term - 7 keystrokes
Exact keys to hit:
<Alt>+100* (<Shift>+8)<Return>
Requirements:
- Your terminal window must be exactly 10 characters wide.
- Your terminal prompt (
PS1) should be empty. - Your working dir must be empty.
memes, 17 bytes
d5+5’{p
Needs ********** as input, therefore +10.
d Don't print result
5+5 10 times
’ loop
{p Print input
Stuck, 10 Bytes
Very simple implementation here, no tricks ;)
'*10*N+10*
Explanation:
'* # Enter char mode, puts '*' on the stack
10* # Multiply string by 10, puts '**********' on the stack
N+ # Push a newline to the stack and append to the asterisks
10* # Multiply that string by 10 and implicitly print.
BrainFuck, 68 Bytes
++[>+++++<-]++[>>>+++++<<<-]++++++[>>+++++++<<-]>[>..........>.<<-]
BrainFuck is fun, this is me practicing my skills.
D2, 11 bytes
!7;//.|a:|a
Explanation:
!7 is expanded to 7 +, so it set the current cell to 7.
; switch to the second shift state (7 is *)
/code|digit repeat code digit times (digit is base 36).
. print the character in the current shift state (so here, * is printed).
: print a newline in shift mode 2.
SX, 21 bytes
和(0,10):我('*'*10)
Actually: this compiles (technically, it just becomes Python) directly to Python. It is the same as:
for i in range(0,10):print('*'*10)
GNU sed, 27 bytes
s/^/**********/;h;H;G;H;g;G
To add to the diversity of languages used, I present a sed solution. The code works as follows, indicating the number of sets of 10 asterisks in pattern space and then in hold space:
s/^/**********/ # 10 asterisks are added to pattern space (1 0)
h # overwrites hold space with pattern space (1 1)
H # appends pattern space to hold space (1 2)
G # appends hold space to pattern space (3 2)
H # (3 5)
g # overwrites pattern space with hold space (5 5)
G # after G, pattern space is printed on exit (10 5)
S.I.L.O.S, 41 bytes
Never used S.I.L.O.S before, can probably be golfed more.
EDIT: Looks like there was already a S.I.L.O.S answer, but it didn't show up on the leaderboard. But I'll keep this answer because it's shorter.
a=10
lblb
printLine **********
a-1
if a b
Racket, 43 36 bytes
It's nice to see friendly Racket competition on here :).
(for([i 10])(displayln"**********"))
Groovy 46 Bytes
(1..10).collect{''.center(10,'*')}.join('\n')
Racket 36 bytes
(for((j 10))(displayln"**********"))
ISOLADOS, 131 bytes
ISOLAADOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAADOOOOOOOOOOS ISOLAAADOOOS ISOLAAAAAAAADOS ISOLAADOOOOOOOOOOS ISOLAAADOOOS ISOLAAAAAAAAADOS
ISOLAADOOOOOOOOOOOS push 11
ISOLAAAAAAADOS chr(a + 31)
ISOLAADOOOOOOOOOOS push 10
ISOLAAADOOOS push a * b
ISOLAAAAAAAADOS push [a]
ISOLAADOOOOOOOOOOS push 10
ISOLAAADOOOS push a * b
ISOLAAAAAAAAADOS join list by new lines
Stata, 49 bytes
loc i=1
wh `i'<11 {
di "**********"
loc i=`i'+1
}
Output
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
PHP, 32 bytes
for(;$i++<10;)echo"**********
";
(variant 32 bytes - was written with echo)
<?=str_repeat("**********
",10);
(variant 33 bytes)
<?=str_pad("",110,"**********
");
(variant 33 bytes)
for(;$i++<110;)echo$i%11?"*":"
";
(variant 35 bytes)
for(;$i++<10;)printf("%'*10s
",'');
(variant 38 bytes)
<?=($a=str_repeat)($a("*",10)."
",10);
Brainfuck, 46 43 bytes
+[[---<]+[-->]<]<<[--<<++..........-->>>.<]
Try it online! Requires an interpreter with a tape that is open on the left and has 8-bit cells.
The first part of this program +[[---<]+[-->]<] sets up the tape like so:
[255, 250, 245, ... 15, 10, 5, 0, 250, 240, 230, ..., 40, 30, 20, 10, 0]
^
This gives a 40 for outputting asterisks (*, ASCII 42), a 20 to use as a loop counter, and a 10 to use for outputting newlines.
Emojicode, 54 bytes
🏁🍇🔂i⏩0 10🍇😀🔤**********🔤🍉🍉
Explanation:
🏁🍇 👴 The beginning of program.
🔂 i ⏩ 0 10 🍇 👵 This is called a "range".
It basically starts with i=0 and increments until i=10, then exits. 👵
😀 🔤**********🔤 👵 😀 is printing class.
The 🔤s make the characters they surround string literals. 👵
🍉 👴 End of range
🍉 👴 End of program
Deadfish ~, 24 bytes
{{iiii}ii{c}{ddd}ddc{d}}
how it works:
{foo} does foo exactly ten times.
first, it starts a ten loop, in this loop, it sets the counter to 42, prints it ten times (as char (asterisk)), decrements it to 10, prints it (newline), subtracts 10, then loops again, doing this 10 times.
GolfScript, 27 bytes
0{"**********\n"\1+.10<}do;
Explanation
0 # Push 0 onto the stack: counter
{
"**********\n" # Push 10 '*' and a newline character
\ # Moves the counter onto the stack
1+ # Increments the counter
.10< # Check if it's smaller than 10
}do; # Repeat until counter equals 10
TI-Basic, 21 bytes
For(I,0,9
Disp "**********
End
Groovy, 23 characters
10.times{println'*'*10}
Fortran, 68 51 49 bytes
Skimmed off 17 bytes, because who needs indents and spaces?
-2 bytes thanks to @Joffan
As a tribute to senior and the fact there was no Fortran answer yet. Well, now I know why: this is a pretty hard language to golf! Just one or two indents already take up more bytes than the shortest answer here :)).
program T
do i=0,9
print*,('*',j=0,9)
end do
end
Try it! (ideone)
I tried golfing it down by introducing a nested 'implied' do loop, but the newline character wasn't available until Fortran 2003. Also, it's insanely verbose...
HTML & CSS, 104 60 bytes
p::after{content:"**********"
<p><p><p><p><p><p><p><p><p><p>
I'm unsure if the byte count is correct (as I'm not counting the <style> tags for CSS. The HTML could also be shortened if I used a HTML preprocessor, but I'm unsure if that's breaking rules
Thanks to manatwork and Business Cat.
See my Jade entry of 36 bytes
Jade & CSS, 41 36 bytes
- for (x=0;x++<10;)
**********<br>
Jade is a HTML pre-processor. I'm unsure if using this is breaking any rule or if I have to include something else in the byte count. This also beats my previous entry of 60 bytes.
See it on Codepen: http://codepen.io/409/pen/ZOPgdJ
Thanks to Business Cat for saving 5 bytes.
LaTeX, 122 110 105 bytes
-12 bytes thanks to @Leaky Nun
-5 bytes by changing package & document type
Or, if I'm allowed to skip the document class definition & setup, and just count the package import and for-loop code: 55 bytes.
I still need to check if there's another package that has a shorter loop syntax, but for now, this simply uses pgffor (from tikz) and a foreach:
\documentclass{book}\usepackage{tikz}\begin{document}\foreach\n in{0,...,9}{**********\par}\end{document}
Ungolfed:
\documentclass{book}
\usepackage{tikz}
\begin{document}
\foreach\n in{0,...,9}{**********\par}
\end{document}
Awk, 37 35 characters
BEGIN{for(OFS="*";++i<NF=11;)print}
Thanks to:
- Cabbie407 for combining the
OFSand loop-based solutions (-2 characters)
Sample run:
bash-4.3$ awk 'BEGIN{for(OFS="*";++i<NF=11;)print}'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Pip, 7 bytes
LtP'*Xt
Straightforward: Loop 10 times. Print string of 10 asterisks each time. Kinda disappointed that the simple way was the shortest...
Grocery List, 72 bytes
G
number ten
v
z
v
P
s
u
c
l
number ten
l
b
c
p
u
n
s
e
x
u
c
p
b
n
s
e
Oracle SQL 11.2, 44 bytes
SELECT'**********'FROM v$bh WHERE rownum<11;
MSM, 19 bytes
.;;.;...;.;;.;..␍**
where ␍ is a newline.
. concatenates the two rightmost characters and ; appends a copy of the rightmost element to the end, so the first commands .;;.;... create one line **********␍ and the next commands ;.;;.;.. make 10 lines out of it.
Vim, 13 8 bytes
Saved 5 bytes thanks to @Lynn
qqi*␛9.o␛q9@q
10i*␛Y9p
10i*␛ insert 10 times *, and Y9p copy the line and paste it 9 times.
DOG, 22 bytes
10 bark "**********\n"
Prints out ********** and a newline 10 times.
Try it online! (you'll have to manually copy the code since I don't have permalink functionality yet ;_;)
ArnoldC, 171 bytes
IT'S SHOWTIME
HEY CHRISTMAS TREE i
YOU SET US UP 10
STICK AROUND i
TALK TO THE HAND "**********"
GET TO THE CHOPPER i
GET DOWN 1
ENOUGH TALK
CHILL
YOU HAVE BEEN TERMINATED
Just for the fun of it. Nothing fancy going on here, just loops 10 times printing ********** each time.
MarioLANG, 101 99 95 bytes
Saved 2 bytes thanks to Martin Ender.
+
++++)+<......(<
++====".======"
+>)+(()>...(.
+====(-=====) -
+++++[!))++ )[!
======#=======#
The left half sets the tape to 10 40 10
The second half increases the 40 to 42, then prints the 42 (*) 10 times, and a newline, and repeats that 10 times.
Befunge '98, 31 bytes
a>:|>1++:9`#@_a,
v*'[^
>,v1
-v>
PowerShell, 14 12 bytes
,('*'*10)*10
Constructs a string of asterisks of length 10 using string multiplication. Encapsulates that in parens and feeds that into the comma-operator to construct an array. We use array multiplication to construct a 10-element array consisting of that element (i.e., a 10-element array of asterisk strings). That's left on the pipeline, and output is implicit (since the default Write-Output for an array is newline-separated, we get that for free -- thanks to @Joey for the clarification).
Older, 14 bytes
0..9|%{'*'*10}
Full program. Loops from 0 to 9 through a ForEach-Object loop |%{...}. Each iteration, we use string multiplication to create a length-10 string of *. Those resulting strings are left on the pipeline, and output at the end is implicit (since the default Write-Output for an array is newline-separated, we get that for free -- thanks to @Joey for the clarification).
T-SQL, 35 bytes
I used a hard carriage return in the string, which is why it wraps to the next line.
select replicate('**********
',10)
Swift, 35 Bytes
for _ in 0...9{print("**********")}
><>, 22 15 bytes
'*o'l),lb%a$?$o
The program exits with an error and the output has no trailing newlines. Try it online!
'*o' Push 42 '*' and 111
l), Divide the 42 by (111 > length of stack) - this is a no-op
initially and a division by zero error later on
lb% Push (length of stack) % 11
a$ Put 10 '\n' beneath that
?$ If (length of stack) % 11 is nonzero, swap top two chars,
moving the '*' above the '\n'
o Output top char, leaving the other char and hence
increasing the length of the stack by 1
><> is a toroidal 2D language, so the above runs in a loop until the division by zero causes the program to error out.
Alternative 15s (which work for different reasons):
'*o'l),lb%?!{oa
'*o'l),lb%?!}oa
C#, 52 50 49 bytes
49 bytes : 'for(int i=0;i++<10;)Console.Write("**********\n")' (Thanks to Csharpie)
50 bytes : for(int i=0;i<10;i++)Console.Write("**********\n")
52 bytes : for(int i=0;i<10;i++)Console.WriteLine("**********")
Close with 70 bytes : Console.WriteLine(String.Concat(Enumerable.Repeat("**********\n",10)))
edit : Test here : Online C# Interactive compiler.
P.S : C# Interactive is there in Visual Studio/Roslyn for a long time, no one said the answer needs to compile into an executable, or that C# is limited to .NET's verbose BCL functions or that C# is limited to Windows.
csi.exe would just be same in functionality as other (interpreted) languages' interpreters do (like PowerShell), which is the beauty of C#.
Mumps, 26 Bytes.
F J=0:1:9 W "**********",!
As loops are fairly efficient (space-wise) in Mumps, I thought I'd see if the loop within a loop was shorter, but it was not; weighing in at 31 bytes:
F I=0:1:9{F J=0:1:9{W "*"} W !}
The braces are allowable loop delimiters in the InterSystems Cache version of Mumps that I use; at times they may save a byte or two golfing, but mostly they're just handy to have nested loops in a one-line routine.
PHP 46 bytes
<?php
for($i=-2;++$i<9;)echo "**********\n";?>
I think this don't needs explanation.
Lua 36 bytes
print((("*"):rep(10).."\n"):rep(10))
There is already a Lua answer, but his was however not a full program that would print output and this one is shorter.
I wanted to post it as a comment to that one, but I don't have the reputation yet.
Emacs, 10 8 keystrokes
F3 C-1 0 * ENTER F4 C-9 F4
Explanation
F3 Starts a macro recording
C-1 0 * Apply 10 times command '*': prints 10 asterix'
ENTER Insert new line
F4 Stops the macro record
C-9 F4 Apply 9 times the macro
Thanks to Sean for saving two keystrokes, suggesting to replace C-udigit with C-digit.
Fuzzy Octo Guacamole, 15 bytes
'*'25**25*!_[X]
Explanation:
'*' # Push '*'
25* # Push 10
* # Multiply, leaves '**********' ('*'*10)
25*!_ # Sets the for-loop counter to 10 (2*5)
[X] # Iterates 10 times and prints '********' each time
Unary, 3584048336806633376708256331142263836115215 bytes
Can't post it here for obvious reasons.
But it's literally just 3584048336806633376708256331142263836115215 zeroes.
VBA, 31 bytes
for i=0to 9:?"**********":next
in the VBA Immediate window. I couldn't find any byte-saving tricks beyond this. My best non-loop version was 45 bytes:
?replace("..........",".","**********"&vblf)
PowerShell, 14 bytes
0..9|%{'*'*10}
Items exiting the pipeline are automatically printed on individual lines by the default PowerShell host.
Hooray for * doing string repetition.
Jelly, 7 bytes
”*x⁵Ṅ9¡
What's going on?
”*x⁵Ṅ9¡ - No arguments
”* - character literal, *
x - multiply (dyadic operation)
⁵ - integer literal, 10 (we have now constructed the string '**********')
Ṅ - Print & linefeed (monadic operation)
9 - integer literal, 9
¡ - Repeat n times (n is 9 as the first Ṅ is not a repeat)
Test it on tryitonline
Ruby, 26 20 bytes
10.times{puts'*'*10}
Explanation
Runs 10 times; each time, it prints * (10 times), with an automatic line break at the end.
Kudos to OrangeFlash81 for saving me 6 bytes.
Scheme, 51 Bytes
(map (lambda (n)(display "**********\n"))(iota 10))
Neoscript, 39 bytes
each _=0:[]:9console:log("**********");
Gibberish, 29 bytes
56ea1[[**********]eo1su1fu]gw
Explanation:
56ea1[[**********]eo1su1fu]gw |
56 | push 5 and 6
e | switch to first instruction set
a | add a, b
1 | push 1
[[**********]eo1su1fu] | push string
g | switch to set 3
w | while a is 1 execute string as code
[**********] | push ten asterisks
e | switch to set 1
o | print a
1s | subtract one
u | duplicate a
1 | push 1
f | switch to set 2
u | pop a, b push 1 if a > b else push 0
Sesos, 11 bytes
With many thanks to Leaky Nun for his help, and credit to his Brainf*ck answer, which inspired this one. Golfing suggestions welcome. Try It Online!
0000000: A8 24 BE EC CB 82 06 BD A7 EC 0E .$.........
How it works
The binary file above has been generated by assembling the following SASM code.
add 42,fwd 1,add 10,fwd 1,add 10 # puts 42, 10, 10 in the register
jmp,sub 1,rwd 1 # starts the first loop
jmp,sub 1,rwd 1,put,fwd 1,jnz # second loop prints 42 or "*"
add 10,put,fwd 1 # resets first loop, prints 10 or "\n"
# first loop ends implicitly
3var, 27 26 bytes
1 byte thanks to Business Cat
iisiia+<*>aaaF[PPPPPPPPPPO]aaamaiis*>iiF[PPPPPPPPPPO]
I don't how do nested loops marked by F.
Go, 84 characters
package main;import"fmt";func main(){for j:=0;j<10;j++{fmt.Println("**********");}}
Sample run:
bash$ go build && ./golf
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
ListSharp, 73 bytes
[FOREACH NUMB IN 1 TO 10 AS k]
{
STRG p=p+"**********"+<newline>
}
SHOW=p
HTML, 136 bytes
**********<br>**********<br>**********<br>**********<br>**********<br>**********<br>**********<br>**********<br>**********<br>**********
JavaScript (115 106 81 chars)
o='';
for(i=0;i<10;i++){l='';for(j=0;j<10;j++){l+='*';}o+=l+"\n";}
console.log(o);
Underload, 22 bytes
(*****):*(
)*:*::*:**S
Bc, 26 characters
for(;i++<10;)"**********
"
Sample run:
bash-4.3$ bc <<< 'for(;i++<10;)"**********
"'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Clojure, 38 bytes
(apply print(repeat 10"**********\n"))
Simple enough
Same, 239 bytes
ЕEЕEЕEЕEЕEEЕЕEЕEЕEЕЕEΕЕEЕEEЕЕЕΕЕЕEЕEЕEЕEЕEЕEЕEЕEЕEЕEΕEEΕEЕΕЕEEЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕΕЕЕEЕEЕEЕEЕEЕEЕEЕEЕEЕEЕЕЕЕEΕEEΕЕЕΕΕΕ
Samebly code used to generate this:
add 5
mstore
add 3
mult
add 2
mstore
clear
add 10
while
minc
mstore
mdec
mread
outc
outc
outc
outc
outc
outc
outc
outc
outc
outc
clear
add 10
outc
minc
mread
mdec
dec
end
Lua, 30 bytes
Full program outputting via its return value.
return("**********\n"):rep(10)
Groovy, 23 characters
print(("*"*10+"\n")*10)
Sample run:
bash-4.3$ groovy -e 'print(("*"*10+"\n")*10)'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Gema, 31 characters
\A=@repeat{10;**********\n}@end
Sample run:
bash-4.3$ gema '\A=@repeat{10;**********\n}@end'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
jq, 24 18 characters
(16 characters code + 2 characters command line option.)
range(10)|"*"*10
Thanks to:
- Leaky Nun for suggesting to use string multiplication (-6 characters)
Sample run:
bash-4.3$ jq -nr 'range(10)|"*"*10'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
On-line test (Passing -r through URL is not supported – check Raw Output yourself.)
99, 137 bytes
99999 9 9
9999 99999 9
999 99 9
999999 99 9
99 99 9 99 9 99 9 99 9999
99
99
99
99
99
99
99
99
99
99
999999
999 999 9
99 999
9 99999
Japt, 10 bytes
'*pA +R pA
Prints * ten times, then \n, then repeat from the beginning ten times.
Demo.
PostgreSQL, 39 bytes
select repeat('**********'||chr(13),10)
MSX BASIC, 40 30 bytes
1FORR=1TO10:FORC=1TO10:?"*";:NEXT:?:NEXT
Update: D'oh... much shorter if I just print whole rows:
1FORR=1TO10:?"**********":NEXT
Python 3, 25 23 bytes
Hey I actually outgolfed someone :).
print(("*"*9+"*\n")*10)
if stderr is valid, 22 bytes
exit(("*"*9+"*\n")*10)
realised that execing didn't actually golf it down :(
25 bytes answer
exec("print('*'*10);"*10)
Works by concatenating ten copies of print('*'*10); and execing, which in turn works by concatenating '*' 10 times and printing
Julia, 23 22 bytes
print(("*"^10*"
")^10)
See here to test on an online interpreter. Thanks @Dennis for the tip!
Javascript, 45 bytes
for(i=0;i<10;i++) {console.log('**********')}
even better, ES6 Javascript, 38 bytes
console.log('**********\n'.repeat(10))
open console and copy paste to test
C#, 53,122 108 bytes
Seeing that I'm seriously new to code golf... I'll give it a shot in c#
public class Program{public static void Main(){for (var i=0;i<10;i++)System.Console.Write("**********\n");}}
try it online
Notepad, 34 31 keystrokes
**********
^A^C↓^V^A^C↓^V^V^V^V
^ denotes Ctrl-<following character> keypress, ↑↓ are up and down keys, respectively.
Props to Crypto for 3 saved keystrokes.
R
matrix(rep("*",100), nrow = 10)
Probably faster way in R, but fun utilization of matrix
Explanation
rep: repeats first argument as many times as second argument.
matrix: creates matrix from vector (first argument), and nrow is the number rows desired in matrix.
dc, 22 18 bytes
[**********]ddddff
Invoked in bash as
echo [**********]ddddff | dc
Explanation:
[**********] # This is dc's way of making a string, which is then pushed onto the stack
dddd # d is for duplicate, so we duplicate it 4 times on the stack
ff # print the whole stack twice, which contains 5 repetitions of 10 *'s (x2)
Thanks to LeakyNun for saving 5 4 bytes; Edited from 5 since I can't count.
Bash (pure), 30 bytes
printf '%.s**********
' {0..9}
Test it on Ideone.
How it works
Before calling the shell built-in printf, Bash expands the glob {0..9} to 0 1 2 3 4 5 6 7 8 9.
The format string
%.s**********
specifies a string whose first 0 characters are included in the output (%.s), followed by ten asterisks and a linefeed. printf repeats the format string as many times as needed to consume all arguments. Since .%s is an empty string, this results in the desired output.
tinyAll, 17 bytes
The current version (untouched for a LONG time), is extremelly broken, but works enough for this challenge.
P'*Ra_P"
[:;]"R9_
Basically:
- Pass
*to theR(repeat) function - Repeat it
a(10) times - Output it (
_) - Pass the output (
;), through string interpolation, prefixed by a newline - To the
Rfunction - And repeat 9 more times
- And display the result
A boring alternative, with the same byte count:
P"**********
"Ra_
Translating:
- Pass
"**********(newline) - To the
Rfunction, to repeata(10) times - And output the result (
_)
Try it:
// Commit https://github.com/ismael-miguel/tinyall/commit/2589837678f4b6556d1bd22f163255e2e058808e#diff-65af36bb0dc600cbc7a54816dcda57fd
(function(window, undefined) {
var funcs = {
//echo
'_':function(value, data){
var tmp = data.out + (value === undefined ? data.last : value);
data.vars[';'] = data.out = tmp;
return tmp;
},
//array
A:function(value, data){
var split_value = (value || '').split(/(\-?\d+(?:\.\d*)?(?:[eE][\-+]?\d+)?|'(?:\\'|[^']*)*'),?/);
var final_value = [];
for(var i = 0, l = split_value.length; i<l; i++)
{
if(split_value[i][0] == '\'')
{
final_value[final_value.length] = split_value[i].replace(/^'(.*)'$/,'$1').replace(/\\'/g,'\'');
}
else if(split_value[i]/1 || split_value[i] == '0')
{
final_value[final_value.length] = +split_value[i];
}
}
return final_value;
},
//comparison functions
C:function(value, data){
},
D:function(value, data){
var debug = {
value: value,
type: typeof value,
memory: data
}
if(console && console.log)
{
console.log(debug);
}
return value;
},
//eval
E:function(value, data){
run_code(value, data);
},
//flip the value around
F:function(value, data){
if(('object' === typeof value) && value.reverse)
{
return value.reverse();
}
else
{
return value.toString().split('').reverse().join('');
}
},
//hello worlds
H:function(value) {
return 'hH'[value&1]
+'ello'
+(value&2?',':'')
+' '
+('wW'[+!!(value&4)])
+'orld'
+(value&8?'!':'')
+(value&16?'\n':'');
},
//math functions
M:function(value, data){
},
//not (inverts values/casing)
N:function(value) {
switch(typeof value)
{
case 'boolean':
return !value;
case 'number':
return -value;
case 'string':
var tmp = '';
for(var i = 0, l = value.length; i < l; i++)
{
if(value[i] >= 'a' && value[i] <= 'z')
{
tmp += String.fromCharCode(value.charCodeAt(i) - 32);
}
else if(value[i] >= 'A' && value[i] <= 'Z')
{
tmp += String.fromCharCode(value.charCodeAt(i) + 32);
}
else
{
tmp += value[i];
}
}
return tmp;
default:
return 0;
}
},
//passthrough
P:function(value) {
return value;
},
//repeat
R:function(value, data){
var tmp = '';
if(value > 0)
{
while(value--)
{
tmp += data.last;
}
}
return tmp;
},
//string functions
S:function(value, data){
var methods = {
t:function(value){
return value.replace(/^\s+/,'').replace(/\s+$/,'');
},
u:function(value){
return value.toUpperCase();
},
T:function(value ){
},
R:function(value){
}
};
var tmp = data.last.toString();
for(var i = 0, l = value.length; i < l; i++)
{
tmp = value[i] in methods ? methods[value[i]](tmp, value, i) : '';
}
return tmp;
},
//clears output
Z:function(value, data) {
return data.vars[';'] = data.out = 0;
}
};
var expand_string = function(value, data){
return value.replace(
/\[:(?:([A-Z_])(.)?|([^A-Z_'"]))\]/g,
function(_, func, arg, value){
if(func)
{
return funcs[func](get_value(arg, data, true), data);
}
else
{
return get_value(value, data, true);
}
}
);
};
var get_value = function(value, data, recursion) {
if(value === null || value === undefined || value === ' ')
{
return undefined;
}
var x = (value || '').toString();
if(/^\-?\d+(?:\.\d*)?(?:[eE][\-+]?\d+)?$/.test(x))
{
//returns a number
return +x;
}
else if(/^[a-z]$/.test(x))
{
//returns a number between 10-43
return (x in data.vars) ? data.vars[x] : x.charCodeAt(0) - 87;
}
else if(x[0] == '\'')
{
return x[1];
}
else if(x[0] == '"' && x.length >= 2)
{
var sub = x.substr(1, x.length - 2);
return recursion ? sub : expand_string(sub, data);
}
else
{
return data.vars[x];
}
};
var run_code = function(code, memory){
if(!code || /^[a-z\d]$/.test(code))
{
memory.out = funcs.H(get_value(code, memory));
}
else
{
code.toString().replace(
// /(?:([^A-Z_:'"])=)?([A-Z_])(?::('.|"[^"]*"|-?\d+|.))?/g,
/(?:([^A-Z_'"])=)?([A-Z_])(?:('.|"[^"]*"|-?\d+|[^A-Z_'"]))?/g,
function(_, name, func, value){
memory.vars[name || ':'] = memory.last = (funcs[func] || noop)( value ? get_value(value, memory) : memory.last, memory);
return '';
}
);
}
}
var noop = function(){};
window.tinyAll=function(code, input) {
var data = {
out: '',
last: 0,
input: input || 0,
vars: {
//version
'|':'0.3',
//input
':':input || 0,
//output
';':0,
//code
'.':(code || '').toString()
}
};
run_code(data.vars['.'], data);
return data.out || 0;
};
})(Function('return this')());
//RUN THE CODE!!!
//\n instead of a real newline, but works the same
console.log(tinyAll('P\'*Ra_P"\n[:;]"R9_'));
console.log(tinyAll('P"**********\n"Ra_'));
Actually, 7 bytes
9u;'**n
Explanation:
9u;'**n
9u; push two copies of 10
'* push "*"
* multiply by one of the copies, yielding "**********"
n push 10 total copies of the string
Wolfram, 22 bytes
Grid[Table["*",10,10]]
R, 27 29 bytes
cat(rep('\r**********\n',10))
An alternate answer (34 bytes) is: cat(rep('**********',10),sep='\n')
Swift 2, 45 Bytes
func a(){for _ in 0...9{print("**********")}}
EXCEL, 26 bytes.
=REPT("**********[ae]",10)
Can go into any cell.
Ruby, 18 bytes
puts (?**10+$/)*10
Alternative version (+3 bytes)
10.times {puts ?**10}
Ungolfed (first version)
puts ('*' * 10 + '\n') * 10
Notepad++, ??? keystrokes
I have no idea how to score this, but I decided to give it a shot since there's an answer on Notepad.
Here's the sequence:
* * * * * CTRL (hold) A D → D D D D D D D D D
C, 47 bytes
main(i){while(i<111)putchar(10|!!(i++%11)<<5);}
Not as compact as the other C answer (putchar is such a long name!), but I don't use the asterisk character in my program. It treats the output as a 11 by 10 grid, where the 11th character is the newline. It then computes the ASCII for '*' (10 + 32 = 42) or '\n' (10) for each position.
I could save one byte with this approach if I were to change the character expression to: 42-!(i++%11)*32, but that would require an asterisk.
Javascript (using external library - Enumerable) (41 bytes)
_.From("**********\n").Cycle(120).Write()
Link to lib: https://github.com/mvegh1/Enumerable/
Code explanation: This runs right in the console. Load the string into the library, which parses it to a char array enumerable. Create a new enumerable from that sequence, which is generated by cycling from start to finish 120 times (because the string length is 12, and we want 10 of them..12*10=120). I.e [1,2,3].Cycle(10) would be 1,2,3,1,2,3,1,2,3,1. Finally, join everything into a string with "" as delimiter
Jelly, 8 bytes
”*x³s⁵j⁷
How it works
”*x³s⁵j⁷ Main link. No arguments.
”* Yield '*'.
x³ Repeat the character 100 times.
s⁵ Split into chunks of length 10.
j⁷ Join, separating by linefeeds.
Perl, 24 bytes
print((("*"x10).$/)x10);
T-SQL, 50 bytes
print replicate(replicate('*',10)+char(10),10)
C# - 88 bytes
class P{static void Main(){int i=0;while(i++<10)System.Console.Write("**********\n");}}
Haskell, 29 bytes
putStr$[0..9]>>"**********\n"
<list1> >> <list2> makes (length <list1>) copies of <list2>.
C (gcc), 41 39 bytes
main(i){for(;++i<puts("**********"););}
C, 84 bytes
#include<stdio>
int main(){int i;for(i=0;i<10;i++){printf("**********\n");return 0;}
If anyone can improve the answer, I'd appreciate it. I'm not trying to compete, it's just been simply ages since I've coded C or C++ and this challenge looked fun.
Maple 30 bytes
printf(cat("**********\n"$10))
MATLAB, 14 bytes
repmat('*',10)
MATL, 8 bytes
'*'10tX"
'*' % Push '*' (string containing an asterisk)
10t % Push 10 twice
X" % Repeat the string 10×10 times. Implicitly display
C++, 75 bytes
#include<cstdio>
int main(){for(int i=0;i<10;++i)std::puts("**********");}
BASH, 46 bytes
for((n=0;n<10;n++));do echo "**********"; done
Perl, 17 bytes
Requires -E at no extra cost.
say"*"x10for 0..9
Usage
perl -E 'say"*"x10for 0..9'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Saved a byte thanks to @manatwork!
golflua, 22 characters
~@i=0,9 w"**********"$
Sample run:
bash-4.3$ golflua -e '~@i=0,9 w"**********"$'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
C#, 79 bytes
class P{void Main(){for(int i=0;i++<10;)System.Console.Write("**********\n");}}
CJam, 9 8 bytes
Thanks to Lynn for saving 1 byte.
'*A*N]A*
Explanation
'*A* e# Create a string of 10 asterisks.
N e# Push a linefeed.
] e# Wrap both in a list.
A* e# Repeat 10 times.
Brainfuck, 47 bytes
++++++++++[->++++>+>+<<<]>++>[-<..........>>.<]
++++++++++[->++++>+>+<<<] set the tape to 40 10 10
>++> set the tape to 42 10 10
[-<..........>>.<] come on
Ruby, 15 characters
puts [?**10]*10
Sample run:
bash-4.3$ ruby -e 'puts [?**10]*10'
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
Brainfuck, 74 bytes
first brainfuck submission ever, first reasonable length program, too
+++>>+++>>+++++++[<+<+<<+>>>>-]<[>++++++<-]<<<[->++++++++++[>>>.<<<-]>.<<]
+++>>+++>>+++++++[<+<+<<+>>>>-]<[>++++++<-] < sets tape to 10 0 10 0 42
<<< moves to the first 10
[->++++++++++[>>>.<<<-]>.<<] <
loops while the first cell of the tape is not zero:
subtracts 1 from first cell
sets the second cell to 10,
loops while second cell is not zero: prints 42 cell, subtracts from second cell
moves to third cell, prints it
SpecBAS - 18 bytes
?(("*"*10)+#13)*10
? is shorthand for PRINT, #13 is the equivalent of \n in other languages.
05AB1E, 7 bytes
TF'*T×,
Explanation
TF # 10 times do:
'*T× # repeat asterisk 10 times
, # print with newline
Cheddar, 21 20 bytes
print('*'*10+'
')*10
Yet another straightforward answer.
Cheddar, 24 bytes
print(['*'*10]*10).vfuse
'*'*10 builds the string **********.
Then, ['**********']*10 creates 10 copies of that string.
Then, vfuse joins by newline.
JavaScript (ES6), 37 bytes
console.log(`**********
`.repeat(10))
A straightforward answer.
C++, 76 bytes
I don't know if this could be golfed further, but just.
#include <iostream>
void a(){for(int i=0;i++<10;)std::cout<<"**********\n";}
Batch, 41 bytes
@for /l %%i in (0,1,9)do @echo **********
Mathematica, 24 bytes
Print@"**********"~Do~10
It's kinda unfortunate that StringRepeat alone is 12 characters long...
J, 10 9 bytes
1 byte thanks to @Adám.
10 10$'*'
Explanation
10 10 specifies the dimension to the operator $ which builds an array with the specified dimensions.
Racket, 52 bytes
(display(string-join(make-list 10"**********")"\n"))
If you're fine with just returning the string and not printing it, you can forego the (display) for a score of 41 bytes.
An alternate answer (longer at 73 bytes, but I like it better personally):
(display(build-string 110(λ(n)(if(eq?(remainder n 10)0)#\newline #\*))))
Jellyfish, 12 10 bytes
Thanks to Zgarb for saving 2 bytes.
P$'*
&;10
Explanation
Using more conventional notation, this program represents the following expression:
P( $( &;(10), '* ) )
&; takes a single value and creates a pair with two times that value, so &;(10) gives us [10 10]. Then $ is reshape which forms a 10x10 grid of asterisks. Finally, P prints the array in "matrix format" which prints each string on its own line.
Retina, 12 bytes
Byte count assumes ISO 8859-1 encoding. The leading linefeed is significant.
10$**
.
$_¶
The first stage writes a string of ten asterisks, the second stage replaces each asterisk with the entire string and a linefeed. This prints two trailing linefeeds.
Python 2, 22 21 bytes
print('*'*10+'\n')*10
Python 2, 21 Bytes
exec"print'**'*5;"*10
Works in a similar way to Destructible Watermelon's Python 3 solution.
Python 3, 29 23 bytes
print(('*'*10+'\n')*10)
Thanks to orlp for shaving off 6 bytes.
Pyth, 6 bytes
VT*T\*
T is 10 in Pyth, Vab executes statement b a times, \* is the asterisk character constant, and multiplying (*) a string and an integer repeats that string n times. Pyth's implicit printing with V means 10 lines are printed.
Java 7, 63 bytes
void f(){for(int i=0;i++<10;)System.out.println("**********");}
Just for kicks. I can't seem to find any tricks to make this shorter. Trying to add logic for a 100-loop or returning a String instead of printing just ends up worse.










