-6
\$\begingroup\$

The challenge is as simple as it suggests, you have to print a string without using single/double quotes in source code.

The string is:

The quick brown fox jumps over the lazy dog
  • Standard loopholes apply

  • , shortest code wins

\$\endgroup\$
8
  • 5
    \$\begingroup\$ You should use the Sandbox first, challenge is way too trivial \$\endgroup\$ – Wasif Feb 19 at 4:00
  • 6
    \$\begingroup\$ Exactly which characters count as single/double quotes? Only the ASCII characters 0x27 and 0x22? (Some answers are using 0x201C (left double quotation mark) or 0x275D (heavy double turned comma quotation mark ornament).) \$\endgroup\$ – Dingus Feb 19 at 5:23
  • 6
    \$\begingroup\$ This would be an interesting challenge, if it hadn't been done a million times. I think Do X without Y can be interesting, but it usually isn't because there are only so many ways to do it creatively (and most have already been done). \$\endgroup\$ – Redwolf Programs Feb 19 at 5:27
  • 13
    \$\begingroup\$ Dear serial downvoter, please leave comments on the answers before downvoting them, so the answerer and future readers can improve the answer \$\endgroup\$ – Wasif Feb 19 at 8:18
  • 5
    \$\begingroup\$ @Wasif I haven't downvoted any of the answers here, but I strongly suspect that most of the downvotes cast match exactly the reason given when you hover over the downvote button: "this answer is not useful." The majority seem to be in languages that simply wouldn't use quotes anyway. You aren't ever owed an explanation - the voter chooses to explain if they believe the answer can be made better. Of course, I could be wrong and someone could be voting based on user - but if you think that is the case you should flag to contact a mod. \$\endgroup\$ – FryAmTheEggman Feb 19 at 21:58

36 Answers 36

12
\$\begingroup\$

Python 2, 69 bytes

#coding:U7
print+ACI-The quick brown fox jumps over the lazy dog+ACI-

Try it online!

There are some other ways to get strings without strings in Python but I think UTF-7 is the shortest method.

Python 3.8, 69 bytes

from idlelib.idle_test.htest import*
print(str(globals())[3242:3285])

Try it online!

Python 3.8, 69 bytes

import test.test_builtin as t
print([*open(t.__file__)][1080][22:65])

Try it online!


Under the assumption that function submissions are OK (the wording 'you have to print' is a little ambiguous), the following works for 64, thanks to ovs:

Python 3.8, 64 bytes

from test.test_binascii import*
BinASCIITest.rawdata[:43].decode

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ +1 Wow its amazing, took my brains to another dimension! \$\endgroup\$ – Wasif Feb 19 at 4:33
  • 1
    \$\begingroup\$ 64 bytes as a function with test.test_binascii.BinASCIITest.rawdata. \$\endgroup\$ – ovs Feb 19 at 11:17
  • \$\begingroup\$ @ovs Nice, that's great. \$\endgroup\$ – Sisyphus Feb 20 at 4:40
4
\$\begingroup\$

x86-16 machine code, IBM PC DOS, 52 bytes

FOX.COM:

00000000: b409 ba08 01cd 21c3 5468 6520 7175 6963  ......!.The quic
00000010: 6b20 6272 6f77 6e20 666f 7820 6a75 6d70  k brown fox jump
00000020: 7320 6f76 6572 2074 6865 206c 617a 7920  s over the lazy
00000030: 646f 6724                                dog$

Unassembled Listing:

B4 09       MOV  AH, 9              ; DOS write string syscall
BA 0108     MOV  DX, OFFSET FOX     ; address for string
CD 21       INT  21H                ; write to stdout
C3          RET                     ; return to DOS
        FOX:
54 68 65 20 71 75 69                ; The qui
63 6B 20 62 72 6F 77                ; ck brow
6E 20 66 6F 78 20 6A                ; n fox j
75 6D 70 73 20 6F 76                ; umps ov
65 72 20 74 68 65 20                ; er the 
6C 61 7A 79 20 64 6F                ; lazy do
67 24                               ; g$

enter image description here

Alternately...

x86-16 machine code, IBM PC / MDA, 101 bytes

BE 010F     MOV  SI, OFFSET FOX         ; source data pointer
B4 B0       MOV  AH, 0B0H               ; MDA video RAM segment is B000 
8E C0       MOV  ES, AX                 ; move segment to ES
BF 0140     MOV  DI, 80*4               ; write output to third row
B1 2B       MOV  CL, 43                 ; length of data to copy 
F3 A5       REP  MOVSW                  ; copy data to video RAM 
C3          RET                         ; return to DOS 
        FOX:
0754 0768 0765 0720                     ; The 
0771 0775 0769 0763                     ; quic
076B 0720 0762 0772                     ; k br
076F 0777 076E 0720                     ; own 
0766 076F 0778 0720                     ; fox 
076A 0775 076D 0770                     ; jump
0773 0720 076F 0776                     ; s ov
0765 0772 0720 0774                     ; er t
0768 0765 0720 076C                     ; he l
0761 077A 0779 0720                     ; azy 
0764 076F 0767                          ; dog

This copies the raw input string directly to the video buffer RAM of the IBM PC Monochrome display adapter (MDA)... real mode is fun huh? It uses the rep movsw instructions to copy a block of data in memory quickly with one instruction (okay, technically two) in the CPU (this is one of the techniques used by "8088 Domination" to achieve full motion video on an IBM PC/XT). Now, each character in video RAM is made up of two bytes, one being the character and the other video attributes, so in order to do the copy entirely by the CPU, the attribute byte is (wastefully) repeated for each character. This is probably the "fastest" way to produce the required output, not the shortest. It would be 62 bytes to use lodsb, stosw and loop, but what fun would that be?

enter image description here

\$\endgroup\$
2
  • 4
    \$\begingroup\$ Congrats on 10k rep! \$\endgroup\$ – Bubbler Feb 19 at 5:06
  • \$\begingroup\$ @Bubbler Thanks! And thanks to the serial downvoter my rep score is now an even multiple of 10! :) \$\endgroup\$ – 640KB Feb 19 at 17:15
3
\$\begingroup\$

Jelly, 25 bytes

“Þgʂ9¡ạȤÞ|Ẹ`X ³ṀÞȯʂȧ0Rỵ»Ṗ

Try it online!

Generated using this golfing tip. However, the string compressed is The quick brown fox jumps over the lazy dogA, because compressing The quick brown fox jumps over the lazy dog has a single quote in the resulting compression. That's why there is an extra on the end.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ My compressor is better! (it's unclear that) is that quote counted as a quote? (I think it isn't because jelly code page...) // Since op allows trailing new line you can use that. // It would be more impressive if you look at the compressor and find ways to make it generate the best N compressions and perhaps cherry-pick from them. \$\endgroup\$ – user202729 Feb 19 at 9:43
3
\$\begingroup\$

Ruby, 52 50 characters

Thanks to

  • Sisyphus for reminding me about $><< (-1 character)
  • Dingus for teaching me about the avoidability of q in %q (-1 character)
$><<%(The quick brown fox jumps over the lazy dog)

Try it online!

Or if you feel this is cheatish,

Ruby, 67 63 characters

puts:The_quick_brown_fox_jumps_over_the_lazy_dog.to_s.tr ?_,?\ 

Try it online!

\$\endgroup\$
0
2
\$\begingroup\$

Vyxal, 28 bytes

`λƛ °⊣ Ṛ¼ ❝⎣ ʀ¬s λΠ λλ ¹› ․→

Try it Online!

\$\endgroup\$
2
\$\begingroup\$

C (gcc), 73 bytes

#define s(x)#x
f(){puts(s(The quick brown fox jumps over the lazy dog));}

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Javascript, 147 bytes, NO QUOTES OR BACKTICKS!!!

n=>String.fromCharCode(84)+(111863585492878046599964977000016072026261675295708949484669367104n.toString(36).replace(/0/g,String.fromCharCode(32)))

Takes a massive Bigint and turns into string. Appends 'T' on the front and replaces 0s with spaces.

I got this Bigint by writing a custom parseInt function for bigInts.

\$\endgroup\$
7
  • \$\begingroup\$ Nice use of the ascii codes +1 \$\endgroup\$ – Wasif Feb 19 at 4:43
  • \$\begingroup\$ @Wasif Thanks! I considered using an array of charcodes but decided a bigint was shorter, and most of the characters worked. \$\endgroup\$ – A username Feb 19 at 4:59
  • 3
    \$\begingroup\$ Since you have to use regex anyway (n=>(/The quick brown fox jumps over the lazy dog/+'').slice(1,-1))() is shorter. \$\endgroup\$ – user202729 Feb 19 at 9:41
  • 3
    \$\begingroup\$ @user202729 I think you mean +[]? \$\endgroup\$ – Neil Feb 19 at 10:25
  • 1
    \$\begingroup\$ 124 bytes by storing String.fromCharCode in a variable and encoding the BigInt in hexa. \$\endgroup\$ – Arnauld Feb 19 at 13:37
2
\$\begingroup\$

sed, 44 bytes

cThe quick brown fox jumps over the lazy dog

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Gema, 50 characters

\A=The quick brown fox jumps over the lazy dog@end

Try it online!

Note that due to the way TIO runs the code, is possible to ignore that normally the tool would wait for input indefinitely. Just like the sed solution does. In our case would mean to get rid of @end.

\$\endgroup\$
2
\$\begingroup\$

Javascript (Browser Console), 52 50 bytes

alert`The quick brown fox jumps over the lazy dog`

-2 for @RedwolfPrograms!

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Works without the parentheses for 50 bytes \$\endgroup\$ – Redwolf Programs Feb 19 at 5:16
  • \$\begingroup\$ @RedwolfPrograms thank you! \$\endgroup\$ – Wasif Feb 19 at 5:17
  • \$\begingroup\$ Do backticks count? I feel like they shouldn't, because lots of languages use them as an alternative to quotes. \$\endgroup\$ – A username Feb 19 at 8:31
  • \$\begingroup\$ @Ausername don't think so, question says for only "single/double" quotes \$\endgroup\$ – Wasif Feb 19 at 8:32
  • \$\begingroup\$ True... Kind of ruins the point thought... \$\endgroup\$ – A username Feb 19 at 8:34
2
\$\begingroup\$

Seed, 6014 bytes

51 32429737401852232227804295321578416370544555457622262891879921280324727410131817586348135470079420921373938348260737299348550007805068404867624897650263347568409592608258945989033792510474363164709158118555665232935403908551415888090695760298337219819413274977014408722140235669339108001709528995376914900494019798521214727367535169036319615676199584661126257462974800782884967804763256678000063025237472650538076831876942979826335539886276642624472204985016283691316313249488093825552581263195700506490263014623798470563718844847334940964632636436478404543496272112184140337568637349767918641524452384959486975049813859244670160569884744538279036643294867674161431756929550170395739925307134312406291063668809195567313928307910934660574895433141956111513050736041440669472422865481546405020220238818265794921314653725749392385549924210837964649297239381603259476675148489582680939048820717739905271461370132524025785160026801625672272913416389786086946626728842588663673416395169524016926695769334183833366462685756958054189820999370092892855665559717806826530952610964256124463840218293029538229042911551526509745973128558291005365222643503139067010483637086697955919587162384655443959408291567894061028044826636171014388153130769792397282335858985323269310727311039012381122390183102126191168963870116881629339035600546009305431793687183913979054151312200573069395058914262857368132993952655571167118263728070696377852599343989848263167312887211748226689125561718255196655446099711296568221690530717651328503948183228932786503716890383195810396161663632504174142420921735055441162618914957825032056019218584287089599270312541933094119409995775035365862244691419255488688879630142415739738796957474249592086989231999568273454247198389863139439897248192949030226324637037937607004428557202644332945222019553599908855943840883606735602486216245714280716148378430738983808375466562604692991701163078094015860708365913183037140180020776525026891135163345427911749533164462233906885068864798951466382247930357444595606617682531499045805835102155190109668901179666311163071611393282924908189215675892953256826649762594463293867383921972181952997833560371571545190945543033351108064265894854803319008655145213765667074789305055723258530694850418765677462165413557272747961130459219342146615095862014137406489375157766959799291089215740196734079295172946350338663239451562589633216908805028629767462044463310475859283605554743731396818983359527612902567406307270838160926586311672252276690909354125055468912844343806046309796590149977323343332039095076680537362333773750051043281967620781236684580688649899599894791764969639275247700776637892615729757899608628514791667795106390376246890330575517824338764219021396958188958235055290896924249770944905659304681507478975095888248103169710912376599445302527257479613158446721050489248195749488706928558735504718025170935741927323467065794383909264457377594759523882192572296622475035751867680970240211437389756819919638407630960455110442606184193067264026141442171015623711890501422832367613695746709948930222515546724629930195488846499833510347190238482605529712469516320662254965090537614222803226025037648742876211599475358691270287755703426317789504791647288818094389174889178573580598175570821287862758983375715639329891266282896317497458005992191139964542011830637498271478110468502674393216859832483523846852947729597069648468842312470305612006735746914087851111863997172391046681759459717971339014228407596211606417529911960602633662917218720051142716331417860009772581365446262780647646418500423648076144228803333865749659637573281088970874066190954610017331862257246361741824782593741016661509572232545061179819355083596692463192474875464520654705101238310664069208813642792125365891708422505379476584155456776493814635231239825935897403100406936196140704838776238310181628800965542553245149025785815694829007293441508673278634434393099554617206350471993124294146473223803396140559107993151916604380084564196399191982675386425933781135023405813878560810911153051095111172727827562315672649547451906884909529341748636764617809729125248176744783875171881994494661071091480821671589718868607994061101658834308895511447169347092505317193264713843584225041739742162139615184271208729165766894113261390708005524455403964360001552052851223029438111062677888351614960807231998971170744469120735054941364852035861789961456545482174278167451365198392286797936260598391554539740121786335810235570524225329612724009830128551592000736194663644492357667898401754216577349274688996071736360199860450232121205159661637932235969680399373088268724804194099965948284358384664286149651501196550155931592955688202307383256425808908360994584627214121376440256818514869392424603087404217294979511369359948459573631775019525795573110275783934235199702189982612969716612616508351305655318312319486010392592157314968285379869378912113522095965649729099115605356241123179504354566820658787022336272843821844715646333822931169249872471238626118062323471860990377660833924224274094180580136050575857503743877680958738176417004535235720993081602279459631882804537975038042695906570668840344258511048701065981677058092545466225138676631339274835498382950945975860148934573988454849267759159804871532850967404424313944412626460725075303852487458407061889843250010267681061549983383885517498653116487011021079103989316108811109008770135791239838420661388515658017897357568826303410520911442509698130259852050618861653089916760408088001501974667676344087690829884515856400221313702290665500426239922177968490710919109801428997746905364162697265448993444147272056571598272452921613022253660898170377475487980316100990266472152354084519726174449151923669875611521325472099357098237652386225613770136784967490867846277011538640258407591060362265437805361893353145097381084278893254852019021049798422190799867511036289820193043831619335483618825799351343292624280903179091725616885889942253970580420823474060588689641162749365310499490972123386293257773534507217296099232061044762268495401392799744

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Not sure if this helps at all, but the befunge program can be golfed to 49 bytes \$\endgroup\$ – ovs Feb 19 at 13:36
1
\$\begingroup\$

PHP, 43 bytes

The quick brown fox jumps over the lazy dog

Try it online!

Knew, php can do this! Trick came handy!

\$\endgroup\$
1
\$\begingroup\$

///, 43 bytes

The quick brown fox jumps over the lazy dog

Try it online!

A slightly more interesting one, 46 bytes

/!/he /T!quick brown fox jumps over t!lazy dog

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Factor, 54 bytes

[[ The quick brown fox jumps over the lazy dog]] write

Try it online!

Does not work on TIO, but works locally in 0.98 stable. [[ ...]] is a multiline string literal which pushes the string on the stack.

Factor, 59 bytes

R/ The quick brown fox jumps over the lazy dog/ raw>> write

Try it online!

Constructs a regex, extracts the raw string representation from it, and then prints the string.

\$\endgroup\$
1
\$\begingroup\$

VBScript, 326 bytes

o=chr(111):s=chr(32):msgbox chr(84)+chr(104)+chr(101)+s+chr(113)+chr(117)+chr(105)+chr(99)+chr(107)+s+chr(98)+chr(114)+o+chr(119)+chr(110)+s+chr(102)+o+chr(120)+s+chr(106)+chr(117)+chr(109)+chr(112)+chr(115)+s+o+chr(118)+chr(101)+chr(114)+s+chr(116)+chr(104)+chr(101)+s+chr(108)+chr(97)+chr(122)+chr(121)+s+chr(100)+o+chr(103)

Oh god works for vbscript too

\$\endgroup\$
1
  • \$\begingroup\$ There are three es, so using a variable will save you 10 bytes. There are also two hs, rs and us which will save you 3 bytes each. \$\endgroup\$ – Neil Feb 19 at 10:28
1
\$\begingroup\$

V (vim), 44 bytes

iThe quick brown fox jumps over the lazy dog

Try it online!

Trick learnt from @Dingus here: Print your username by ONLY using the characters in your username

\$\endgroup\$
1
  • 2
    \$\begingroup\$ The first character can also be I, a, A, and probably some other things that I don't remember because I don't use vim that much. \$\endgroup\$ – PkmnQ Feb 19 at 4:47
1
\$\begingroup\$

Emotinomicon, 60 bytes

😭god yzal eht revo spmuj xof nworb kciuq ehT😲⏪⏬⏩

Explanation

😭  god yzal eht revo spmuj xof nworb kciuq ehT 😲  ⏪   ⏬   ⏩   explanation
😭                      begin quote string
god yzal eht revo spmuj xof nworb kciuq ehT                 
😲              end quote string
⏪           open loop
⏬       pops and outputs top of stack as character
⏩   close loop

enter image description here

Interpreter

\$\endgroup\$
1
\$\begingroup\$

Retina, 44 bytes


The quick brown fox jumps over the lazy dog

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Japt, 39 bytes

`The quick ß–n fox jumps ov€ e lazy ºg

Try it online!

\$\endgroup\$
2
  • \$\begingroup\$ 38 bytes \$\endgroup\$ – Shaggy Feb 19 at 12:02
  • \$\begingroup\$ @Shaggy hi, there is " in the code, if you post into answer body in SE \$\endgroup\$ – Wasif Feb 21 at 9:54
1
\$\begingroup\$

Emojicode, 73 bytes

🏁🍇😀🔤The quick brown fox jumps over the lazy dog🔤❗️🍉

Try it online!

\$\endgroup\$
1
\$\begingroup\$

APL (Dyalog Unicode), 60 58 bytes (SBCS)

Anonymous prefix lambda taking (and ignoring) a dummy argument.

{0::21↓2⊃⎕DM⋄The quick brown fox jumps over the lazy dog
}

Try it online!

{ dfn:

0:: if any error happens:

  ⎕DM get the Diagnostic Message (a list of three strings; the error message, the offending code line, a line with indicating the error position)

  2⊃ pick the second element (i.e. our code, with some spacing normalised)

  21↓ drop 22 characters from the front

 now try:

  Thedog this expression which fails with a value error on dog.

\$\endgroup\$
1
\$\begingroup\$

dc, 46

[The quick brown fox jumps over the lazy dog]p

Try it online!

\$\endgroup\$
0
\$\begingroup\$

HTML, 43 bytes

The quick brown fox jumps over the lazy dog

Save it as .html file and then run, will print in the browser

\$\endgroup\$
2
  • \$\begingroup\$ Same thing can also be done with /// \$\endgroup\$ – PkmnQ Feb 19 at 4:02
  • \$\begingroup\$ @PkmnQ credit yours post an answer \$\endgroup\$ – Wasif Feb 19 at 4:04
0
\$\begingroup\$

PowerShell, 54 bytes

Write-Host The quick brown fox jumps over the lazy dog

Try it online!

But a newline at the end.

PowerShell, 57 bytes

Write-Host -n The quick brown fox jumps over the lazy dog

Try it online!

For no newline

\$\endgroup\$
0
\$\begingroup\$

Bash, 51 bytes

echo -n The quick brown fox jumps over the lazy dog

Try it online!

No newlines for the 51 bytes one. Remove the -n to print the newline too and get 3 bytes saved

\$\endgroup\$
0
\$\begingroup\$

Windows Batch, 48 bytes (With newline)

echo The quick brown fox jumps over the lazy dog
\$\endgroup\$
0
\$\begingroup\$

Charcoal, 43 bytes

The quick brown fox jumps over the lazy dog

Try it online!

Trick learnt from @Wezl: Print your username by ONLY using the characters in your username

\$\endgroup\$
2
  • \$\begingroup\$ If s are allowed then T”↶↖⊟⪫⊘↓H§1↗|j(MξY|§;:⊗≦↷↓r÷⁶W is shorter. \$\endgroup\$ – Neil Feb 19 at 10:32
  • \$\begingroup\$ If they aren't allowed then T⍘⍘!pkPqZ{OAC|y+JvpyOQ/!D^]d\ER8[Rγ⁺ β is still only 38 bytes. \$\endgroup\$ – Neil Feb 19 at 10:35
0
\$\begingroup\$

JavaScript (Node.js), 58 bytes

console.log(`The quick brown fox jumps over the lazy dog`)

Try it online!

Yeah, backticks work

\$\endgroup\$
1
  • \$\begingroup\$ Do they? Look around. \$\endgroup\$ – A username Feb 19 at 8:30
0
\$\begingroup\$

Perl 5, 65 characters

print<DATA>;
__DATA__
The quick brown fox jumps over the lazy dog

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Stax, 19 bytes

û♥~↕O1÷9φÉ12êêqï╟Oº

Run and debug it

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.