Code Golf Measurer © 2019Write a hello world GUI program that closes itself after three secondsCode Golf Image DownloaderCode Golf: Gibberish Echo“Hello world” that creates a different “Hello world” programIt's Not 2015 Anymore!Double-duty quine: quine!dlroW ,olleHShortest Unique SubstringDouble rotationInterlace stringsAnimate the text in your terminal

Why do Computer Science degrees contain a high proportion of mathematics?

3-prong to 4-prong conversion - EXTRA MISLABELLED WIRES - Dryer cable upgrade and installation

Is there a push, in the United States, to use gender-neutral language and gender pronouns (when they are given)?

Can you upgrade armour from breastplate to halfplate?

Can we not simply connect a battery to a RAM to prevent data loss during power cuts?

What are the branches of statistics?

In "Avatar: The Last Airbender" can a metalbender bloodbend if there is metal in our blood?

Is it possible to unmount a partition table?

Why does Sonny say they call Michael "Giogali"?

Can digital computers understand infinity?

A fast aquatic predator with multiple eyes and pupils. Would these eyes be possible?

Dice? = Is that so?

A curious 5x5 square

Does my protagonist need to be the most important character?

Should I avoid "big words" when writing to a younger audience?

How to plot two axis bar chart side by side

How to create a vimrc macro using :sort?

How can I prove mathematically the reflection matrix has only the eigenvalues 1 or -1?

When did MCMC become commonplace?

Satellite for internet... Safe enough?

How many records can an Apex Batch process

What is "demographic engineering" and how does it differ from ethnic cleansing?

Standard cumulative distribution function with optimization model variable

Is Schrodinger's Cat itself an observer?



Code Golf Measurer © 2019


Write a hello world GUI program that closes itself after three secondsCode Golf Image DownloaderCode Golf: Gibberish Echo“Hello world” that creates a different “Hello world” programIt's Not 2015 Anymore!Double-duty quine: quine!dlroW ,olleHShortest Unique SubstringDouble rotationInterlace stringsAnimate the text in your terminal






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









6














$begingroup$


Code Golf Measurer © 2019



Hexdumps used with xxd look something like this:



00000000: 666f 6f20 6261 7220 7370 616d 2065 6767 foo bar spam egg
00000010: 730a s.


Your task is to convert a hexdump in this form in to the number of bytes used.



Rules:



  • Usual loopholes forbidden.

  • This is code-golf, so shortest valid answer in bytes wins.

  • You may or may not include the newline at the end of text (0a). This means that if the hexdump ends in a newline (0a), that input may have it's output reduced by one.

  • An empty input (literally nothing: empty list/string/etc.) must output 0.

  • Input can be taken in any form

  • Input will be valid ASCII with no control characters

  • The input must contain the whole hexdump

Test cases:



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 2120 4865 Hello, world! He
00000010: 6c6c 6f2c 2077 6f72 6c64 210a llo, world!.


returns 28 or 27



00000000: 0a .


returns 1 or 0



00000000: 6368 616c 6c65 6e67 650a challenge.


returns 10 or 9



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 21 Hello, world!


returns 13






returns 0 (This is literally nothing: empty list/string/etc.)



Explanations would be nice for non-standard languages.










share|improve this question











$endgroup$















  • $begingroup$
    May we assume the input is ascii? Can it contain control characters? What are the input rules? Some languages can't handle input over multiple lines. Can we pad the last line so that all lines are equally long? Why include the blank input?
    $endgroup$
    – Stewie Griffin
    9 hours ago











  • $begingroup$
    @StewieGriffin Yes; no; yes; because if xxd is fed an empty string, it outputs nothing.
    $endgroup$
    – gadzooks02
    9 hours ago











  • $begingroup$
    @StewieGriffin You edited your comment while I was answering, so here's an expansion: Yes; No; it can be input however you want, provided the whole dump is included; See last answer; Yes; Because if xxd is fed an empty string, it outputs nothing
    $endgroup$
    – gadzooks02
    9 hours ago






  • 1




    $begingroup$
    @JonathanAllan Oh yes, well spotted.
    $endgroup$
    – gadzooks02
    8 hours ago

















6














$begingroup$


Code Golf Measurer © 2019



Hexdumps used with xxd look something like this:



00000000: 666f 6f20 6261 7220 7370 616d 2065 6767 foo bar spam egg
00000010: 730a s.


Your task is to convert a hexdump in this form in to the number of bytes used.



Rules:



  • Usual loopholes forbidden.

  • This is code-golf, so shortest valid answer in bytes wins.

  • You may or may not include the newline at the end of text (0a). This means that if the hexdump ends in a newline (0a), that input may have it's output reduced by one.

  • An empty input (literally nothing: empty list/string/etc.) must output 0.

  • Input can be taken in any form

  • Input will be valid ASCII with no control characters

  • The input must contain the whole hexdump

Test cases:



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 2120 4865 Hello, world! He
00000010: 6c6c 6f2c 2077 6f72 6c64 210a llo, world!.


returns 28 or 27



00000000: 0a .


returns 1 or 0



00000000: 6368 616c 6c65 6e67 650a challenge.


returns 10 or 9



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 21 Hello, world!


returns 13






returns 0 (This is literally nothing: empty list/string/etc.)



Explanations would be nice for non-standard languages.










share|improve this question











$endgroup$















  • $begingroup$
    May we assume the input is ascii? Can it contain control characters? What are the input rules? Some languages can't handle input over multiple lines. Can we pad the last line so that all lines are equally long? Why include the blank input?
    $endgroup$
    – Stewie Griffin
    9 hours ago











  • $begingroup$
    @StewieGriffin Yes; no; yes; because if xxd is fed an empty string, it outputs nothing.
    $endgroup$
    – gadzooks02
    9 hours ago











  • $begingroup$
    @StewieGriffin You edited your comment while I was answering, so here's an expansion: Yes; No; it can be input however you want, provided the whole dump is included; See last answer; Yes; Because if xxd is fed an empty string, it outputs nothing
    $endgroup$
    – gadzooks02
    9 hours ago






  • 1




    $begingroup$
    @JonathanAllan Oh yes, well spotted.
    $endgroup$
    – gadzooks02
    8 hours ago













6












6








6





$begingroup$


Code Golf Measurer © 2019



Hexdumps used with xxd look something like this:



00000000: 666f 6f20 6261 7220 7370 616d 2065 6767 foo bar spam egg
00000010: 730a s.


Your task is to convert a hexdump in this form in to the number of bytes used.



Rules:



  • Usual loopholes forbidden.

  • This is code-golf, so shortest valid answer in bytes wins.

  • You may or may not include the newline at the end of text (0a). This means that if the hexdump ends in a newline (0a), that input may have it's output reduced by one.

  • An empty input (literally nothing: empty list/string/etc.) must output 0.

  • Input can be taken in any form

  • Input will be valid ASCII with no control characters

  • The input must contain the whole hexdump

Test cases:



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 2120 4865 Hello, world! He
00000010: 6c6c 6f2c 2077 6f72 6c64 210a llo, world!.


returns 28 or 27



00000000: 0a .


returns 1 or 0



00000000: 6368 616c 6c65 6e67 650a challenge.


returns 10 or 9



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 21 Hello, world!


returns 13






returns 0 (This is literally nothing: empty list/string/etc.)



Explanations would be nice for non-standard languages.










share|improve this question











$endgroup$




Code Golf Measurer © 2019



Hexdumps used with xxd look something like this:



00000000: 666f 6f20 6261 7220 7370 616d 2065 6767 foo bar spam egg
00000010: 730a s.


Your task is to convert a hexdump in this form in to the number of bytes used.



Rules:



  • Usual loopholes forbidden.

  • This is code-golf, so shortest valid answer in bytes wins.

  • You may or may not include the newline at the end of text (0a). This means that if the hexdump ends in a newline (0a), that input may have it's output reduced by one.

  • An empty input (literally nothing: empty list/string/etc.) must output 0.

  • Input can be taken in any form

  • Input will be valid ASCII with no control characters

  • The input must contain the whole hexdump

Test cases:



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 2120 4865 Hello, world! He
00000010: 6c6c 6f2c 2077 6f72 6c64 210a llo, world!.


returns 28 or 27



00000000: 0a .


returns 1 or 0



00000000: 6368 616c 6c65 6e67 650a challenge.


returns 10 or 9



00000000: 4865 6c6c 6f2c 2077 6f72 6c64 21 Hello, world!


returns 13






returns 0 (This is literally nothing: empty list/string/etc.)



Explanations would be nice for non-standard languages.







code-golf string hexadecimal






share|improve this question















share|improve this question













share|improve this question




share|improve this question



share|improve this question








edited 8 hours ago







gadzooks02

















asked 9 hours ago









gadzooks02gadzooks02

745 bronze badges




745 bronze badges














  • $begingroup$
    May we assume the input is ascii? Can it contain control characters? What are the input rules? Some languages can't handle input over multiple lines. Can we pad the last line so that all lines are equally long? Why include the blank input?
    $endgroup$
    – Stewie Griffin
    9 hours ago











  • $begingroup$
    @StewieGriffin Yes; no; yes; because if xxd is fed an empty string, it outputs nothing.
    $endgroup$
    – gadzooks02
    9 hours ago











  • $begingroup$
    @StewieGriffin You edited your comment while I was answering, so here's an expansion: Yes; No; it can be input however you want, provided the whole dump is included; See last answer; Yes; Because if xxd is fed an empty string, it outputs nothing
    $endgroup$
    – gadzooks02
    9 hours ago






  • 1




    $begingroup$
    @JonathanAllan Oh yes, well spotted.
    $endgroup$
    – gadzooks02
    8 hours ago
















  • $begingroup$
    May we assume the input is ascii? Can it contain control characters? What are the input rules? Some languages can't handle input over multiple lines. Can we pad the last line so that all lines are equally long? Why include the blank input?
    $endgroup$
    – Stewie Griffin
    9 hours ago











  • $begingroup$
    @StewieGriffin Yes; no; yes; because if xxd is fed an empty string, it outputs nothing.
    $endgroup$
    – gadzooks02
    9 hours ago











  • $begingroup$
    @StewieGriffin You edited your comment while I was answering, so here's an expansion: Yes; No; it can be input however you want, provided the whole dump is included; See last answer; Yes; Because if xxd is fed an empty string, it outputs nothing
    $endgroup$
    – gadzooks02
    9 hours ago






  • 1




    $begingroup$
    @JonathanAllan Oh yes, well spotted.
    $endgroup$
    – gadzooks02
    8 hours ago















$begingroup$
May we assume the input is ascii? Can it contain control characters? What are the input rules? Some languages can't handle input over multiple lines. Can we pad the last line so that all lines are equally long? Why include the blank input?
$endgroup$
– Stewie Griffin
9 hours ago





$begingroup$
May we assume the input is ascii? Can it contain control characters? What are the input rules? Some languages can't handle input over multiple lines. Can we pad the last line so that all lines are equally long? Why include the blank input?
$endgroup$
– Stewie Griffin
9 hours ago













$begingroup$
@StewieGriffin Yes; no; yes; because if xxd is fed an empty string, it outputs nothing.
$endgroup$
– gadzooks02
9 hours ago





$begingroup$
@StewieGriffin Yes; no; yes; because if xxd is fed an empty string, it outputs nothing.
$endgroup$
– gadzooks02
9 hours ago













$begingroup$
@StewieGriffin You edited your comment while I was answering, so here's an expansion: Yes; No; it can be input however you want, provided the whole dump is included; See last answer; Yes; Because if xxd is fed an empty string, it outputs nothing
$endgroup$
– gadzooks02
9 hours ago




$begingroup$
@StewieGriffin You edited your comment while I was answering, so here's an expansion: Yes; No; it can be input however you want, provided the whole dump is included; See last answer; Yes; Because if xxd is fed an empty string, it outputs nothing
$endgroup$
– gadzooks02
9 hours ago




1




1




$begingroup$
@JonathanAllan Oh yes, well spotted.
$endgroup$
– gadzooks02
8 hours ago




$begingroup$
@JonathanAllan Oh yes, well spotted.
$endgroup$
– gadzooks02
8 hours ago










13 Answers
13






active

oldest

votes


















2
















$begingroup$


APL (Dyalog Extended), 18 bytes





Full program. Prompts for list of strings (i.e. of lists of characters).



2÷⍨≢∊(1↓≠⊆⊢)¨49↑¨⎕


Try it online!



 prompt



49↑¨ take the first 49 characters from each



( apply the following tacit function to each:



 the argument



 chop into runs of characters that are



 different from the padding character (space)



1↓ drop the first "word"



ϵnlist (flatten)



 tally



2÷⍨ divide by two






share|improve this answer










$endgroup$






















    1
















    $begingroup$


    Jelly, 5 bytes



    Ẉ_51S


    A monadic Link accepting a list of lines which yield the integer byte count.



    Try it online!



    How?



    Ẉ_51S - Link: list of lists of characters, H
    Ẉ - length of each (line in H)
    51 - literal fifty-one
    _ - subtract (vectorises)
    S - sum





    share|improve this answer












    $endgroup$














    • $begingroup$
      You can accept a list of lines. Also, would you care to add an explanation?
      $endgroup$
      – gadzooks02
      9 hours ago











    • $begingroup$
      Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
      $endgroup$
      – Jonathan Allan
      9 hours ago











    • $begingroup$
      It's and empty list/string/etc. I've just clarified this.
      $endgroup$
      – gadzooks02
      9 hours ago










    • $begingroup$
      Thanks, explanation added now too.
      $endgroup$
      – Jonathan Allan
      8 hours ago


















    1
















    $begingroup$


    V (vim), 10 bytes



    ÎdW9WD
    Øøø


    Try it online!



    Explanation:



    Î " On every line...
    dW " Delete the first WORD
    9W " Move 9 WORDS forward
    D " Delete everything after the cursor
    Ø " Count the number of regex matches on every line...
    øø " Two hexadecimal characters in a row


    Hexdump:



    00000000: ce64 5739 5744 0dd8 f8f8 .dW9WD....





    share|improve this answer












    $endgroup$






















      0
















      $begingroup$


      tcsh, 12 bytes





      xxd -r|wc -c


      Try it online!






      share|improve this answer










      $endgroup$






















        0
















        $begingroup$


        Befunge-98 (FBBI), 16 bytes



        "c- cw|r- dxx"=@


        Try it online!






        share|improve this answer










        $endgroup$






















          0
















          $begingroup$


          05AB1E, 8 bytes



          |εg51-}O


          Try it online!



          | get all input lines
          ε for each line
          g51- subtract 51 from length
          }
          O push the sum of the resulting list





          share|improve this answer












          $endgroup$










          • 1




            $begingroup$
            Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
            $endgroup$
            – gadzooks02
            9 hours ago










          • $begingroup$
            Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
            $endgroup$
            – Dorian
            8 hours ago


















          0
















          $begingroup$


          Japt -x, 5 bytes



          Input as an array of lines.



          ®Ê-51


          Try it



          ®Ê-51 :Implicit input of array
          ® :Map
          Ê : Length
          -51 : Subtract 51
          :Implicit output of sum of resulting array





          share|improve this answer












          $endgroup$














          • $begingroup$
            An explanation would be nice :)
            $endgroup$
            – gadzooks02
            8 hours ago










          • $begingroup$
            Coming soon, @gadzooks02. But it's the same as the Jelly solution.
            $endgroup$
            – Shaggy
            8 hours ago










          • $begingroup$
            @gadzooks02, explanation added.
            $endgroup$
            – Shaggy
            7 hours ago


















          0
















          $begingroup$


          Red, 81 bytes



          func[s][n: 0 try[foreach l s[n: n + length? trim/all at take/part l 49 10]]n / 2]


          Try it online!






          share|improve this answer










          $endgroup$






















            0
















            $begingroup$


            C (gcc), 64 bytes





            s[];f(r,l)r=0;while(*s=0,gets(s),l=strlen(s))r+=l-51;return r;


            Try it online!






            share|improve this answer










            $endgroup$














            • $begingroup$
              You could use for.
              $endgroup$
              – Jonathan Frech
              5 hours ago










            • $begingroup$
              Also, s[] seems to me to be unstable undefined behaviour.
              $endgroup$
              – Jonathan Frech
              5 hours ago


















            0
















            $begingroup$

            Python 3, 48 bytes



            f=lambda s:(len(s)or 51)+1-52*len(s.split('n'))


            Input is passed as a string to the function f. The function increments the length of the input (including newlines), then subtracts 52 for each line.



            Try it online






            share|improve this answer










            $endgroup$






















              0
















              $begingroup$

              JavaScript (ES6), 34 bytes





              s=>(n=s.length)&&(n/68<<4)+n%68-51


              Try it online!



              Commented



              s => // s = input string
              (n = s.length) && // n = length of s; return 0 right away if n = 0 (special case)
              (n / 68 << 4) + // otherwise compute the number of full lines and multiply it by 16
              n % 68 - 51 // add the length of the last line minus 51





              share|improve this answer












              $endgroup$






















                0
















                $begingroup$


                Retina 0.8.2, 8 bytes



                .51

                .


                Try it online! Explanation:



                .51


                Delete the first 51 characters of each line. (Lines can only have between 52 and 67 characters, so this always matches once per line.)



                .


                Count the remaining non-newline characters.






                share|improve this answer










                $endgroup$






















                  0
















                  $begingroup$


                  Perl 6, 18 bytes





                  .join.comb-51*$_


                  Try it online!



                  Anonymous Whatever lambda that takes a list of lines and returns the sum of the number of characters, subtracting 51 for each line






                  share|improve this answer












                  $endgroup$
















                    Your Answer






                    StackExchange.ifUsing("editor", function ()
                    StackExchange.using("externalEditor", function ()
                    StackExchange.using("snippets", function ()
                    StackExchange.snippets.init();
                    );
                    );
                    , "code-snippets");

                    StackExchange.ready(function()
                    var channelOptions =
                    tags: "".split(" "),
                    id: "200"
                    ;
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function()
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled)
                    StackExchange.using("snippets", function()
                    createEditor();
                    );

                    else
                    createEditor();

                    );

                    function createEditor()
                    StackExchange.prepareEditor(
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: false,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: null,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader:
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    ,
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    );



                    );














                    draft saved

                    draft discarded
















                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f194040%2fcode-golf-measurer-2019%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown


























                    13 Answers
                    13






                    active

                    oldest

                    votes








                    13 Answers
                    13






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    2
















                    $begingroup$


                    APL (Dyalog Extended), 18 bytes





                    Full program. Prompts for list of strings (i.e. of lists of characters).



                    2÷⍨≢∊(1↓≠⊆⊢)¨49↑¨⎕


                    Try it online!



                     prompt



                    49↑¨ take the first 49 characters from each



                    ( apply the following tacit function to each:



                     the argument



                     chop into runs of characters that are



                     different from the padding character (space)



                    1↓ drop the first "word"



                    ϵnlist (flatten)



                     tally



                    2÷⍨ divide by two






                    share|improve this answer










                    $endgroup$



















                      2
















                      $begingroup$


                      APL (Dyalog Extended), 18 bytes





                      Full program. Prompts for list of strings (i.e. of lists of characters).



                      2÷⍨≢∊(1↓≠⊆⊢)¨49↑¨⎕


                      Try it online!



                       prompt



                      49↑¨ take the first 49 characters from each



                      ( apply the following tacit function to each:



                       the argument



                       chop into runs of characters that are



                       different from the padding character (space)



                      1↓ drop the first "word"



                      ϵnlist (flatten)



                       tally



                      2÷⍨ divide by two






                      share|improve this answer










                      $endgroup$

















                        2














                        2










                        2







                        $begingroup$


                        APL (Dyalog Extended), 18 bytes





                        Full program. Prompts for list of strings (i.e. of lists of characters).



                        2÷⍨≢∊(1↓≠⊆⊢)¨49↑¨⎕


                        Try it online!



                         prompt



                        49↑¨ take the first 49 characters from each



                        ( apply the following tacit function to each:



                         the argument



                         chop into runs of characters that are



                         different from the padding character (space)



                        1↓ drop the first "word"



                        ϵnlist (flatten)



                         tally



                        2÷⍨ divide by two






                        share|improve this answer










                        $endgroup$




                        APL (Dyalog Extended), 18 bytes





                        Full program. Prompts for list of strings (i.e. of lists of characters).



                        2÷⍨≢∊(1↓≠⊆⊢)¨49↑¨⎕


                        Try it online!



                         prompt



                        49↑¨ take the first 49 characters from each



                        ( apply the following tacit function to each:



                         the argument



                         chop into runs of characters that are



                         different from the padding character (space)



                        1↓ drop the first "word"



                        ϵnlist (flatten)



                         tally



                        2÷⍨ divide by two







                        share|improve this answer













                        share|improve this answer




                        share|improve this answer



                        share|improve this answer










                        answered 8 hours ago









                        AdámAdám

                        30.9k2 gold badges87 silver badges221 bronze badges




                        30.9k2 gold badges87 silver badges221 bronze badges


























                            1
















                            $begingroup$


                            Jelly, 5 bytes



                            Ẉ_51S


                            A monadic Link accepting a list of lines which yield the integer byte count.



                            Try it online!



                            How?



                            Ẉ_51S - Link: list of lists of characters, H
                            Ẉ - length of each (line in H)
                            51 - literal fifty-one
                            _ - subtract (vectorises)
                            S - sum





                            share|improve this answer












                            $endgroup$














                            • $begingroup$
                              You can accept a list of lines. Also, would you care to add an explanation?
                              $endgroup$
                              – gadzooks02
                              9 hours ago











                            • $begingroup$
                              Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
                              $endgroup$
                              – Jonathan Allan
                              9 hours ago











                            • $begingroup$
                              It's and empty list/string/etc. I've just clarified this.
                              $endgroup$
                              – gadzooks02
                              9 hours ago










                            • $begingroup$
                              Thanks, explanation added now too.
                              $endgroup$
                              – Jonathan Allan
                              8 hours ago















                            1
















                            $begingroup$


                            Jelly, 5 bytes



                            Ẉ_51S


                            A monadic Link accepting a list of lines which yield the integer byte count.



                            Try it online!



                            How?



                            Ẉ_51S - Link: list of lists of characters, H
                            Ẉ - length of each (line in H)
                            51 - literal fifty-one
                            _ - subtract (vectorises)
                            S - sum





                            share|improve this answer












                            $endgroup$














                            • $begingroup$
                              You can accept a list of lines. Also, would you care to add an explanation?
                              $endgroup$
                              – gadzooks02
                              9 hours ago











                            • $begingroup$
                              Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
                              $endgroup$
                              – Jonathan Allan
                              9 hours ago











                            • $begingroup$
                              It's and empty list/string/etc. I've just clarified this.
                              $endgroup$
                              – gadzooks02
                              9 hours ago










                            • $begingroup$
                              Thanks, explanation added now too.
                              $endgroup$
                              – Jonathan Allan
                              8 hours ago













                            1














                            1










                            1







                            $begingroup$


                            Jelly, 5 bytes



                            Ẉ_51S


                            A monadic Link accepting a list of lines which yield the integer byte count.



                            Try it online!



                            How?



                            Ẉ_51S - Link: list of lists of characters, H
                            Ẉ - length of each (line in H)
                            51 - literal fifty-one
                            _ - subtract (vectorises)
                            S - sum





                            share|improve this answer












                            $endgroup$




                            Jelly, 5 bytes



                            Ẉ_51S


                            A monadic Link accepting a list of lines which yield the integer byte count.



                            Try it online!



                            How?



                            Ẉ_51S - Link: list of lists of characters, H
                            Ẉ - length of each (line in H)
                            51 - literal fifty-one
                            _ - subtract (vectorises)
                            S - sum






                            share|improve this answer















                            share|improve this answer




                            share|improve this answer



                            share|improve this answer








                            edited 9 hours ago

























                            answered 9 hours ago









                            Jonathan AllanJonathan Allan

                            61.2k5 gold badges44 silver badges188 bronze badges




                            61.2k5 gold badges44 silver badges188 bronze badges














                            • $begingroup$
                              You can accept a list of lines. Also, would you care to add an explanation?
                              $endgroup$
                              – gadzooks02
                              9 hours ago











                            • $begingroup$
                              Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
                              $endgroup$
                              – Jonathan Allan
                              9 hours ago











                            • $begingroup$
                              It's and empty list/string/etc. I've just clarified this.
                              $endgroup$
                              – gadzooks02
                              9 hours ago










                            • $begingroup$
                              Thanks, explanation added now too.
                              $endgroup$
                              – Jonathan Allan
                              8 hours ago
















                            • $begingroup$
                              You can accept a list of lines. Also, would you care to add an explanation?
                              $endgroup$
                              – gadzooks02
                              9 hours ago











                            • $begingroup$
                              Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
                              $endgroup$
                              – Jonathan Allan
                              9 hours ago











                            • $begingroup$
                              It's and empty list/string/etc. I've just clarified this.
                              $endgroup$
                              – gadzooks02
                              9 hours ago










                            • $begingroup$
                              Thanks, explanation added now too.
                              $endgroup$
                              – Jonathan Allan
                              8 hours ago















                            $begingroup$
                            You can accept a list of lines. Also, would you care to add an explanation?
                            $endgroup$
                            – gadzooks02
                            9 hours ago





                            $begingroup$
                            You can accept a list of lines. Also, would you care to add an explanation?
                            $endgroup$
                            – gadzooks02
                            9 hours ago













                            $begingroup$
                            Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
                            $endgroup$
                            – Jonathan Allan
                            9 hours ago





                            $begingroup$
                            Ah cool, so is the empty input an empty list OR a list with a single empty line? (This should be made clear in the post since it's an edge-case.)
                            $endgroup$
                            – Jonathan Allan
                            9 hours ago













                            $begingroup$
                            It's and empty list/string/etc. I've just clarified this.
                            $endgroup$
                            – gadzooks02
                            9 hours ago




                            $begingroup$
                            It's and empty list/string/etc. I've just clarified this.
                            $endgroup$
                            – gadzooks02
                            9 hours ago












                            $begingroup$
                            Thanks, explanation added now too.
                            $endgroup$
                            – Jonathan Allan
                            8 hours ago




                            $begingroup$
                            Thanks, explanation added now too.
                            $endgroup$
                            – Jonathan Allan
                            8 hours ago











                            1
















                            $begingroup$


                            V (vim), 10 bytes



                            ÎdW9WD
                            Øøø


                            Try it online!



                            Explanation:



                            Î " On every line...
                            dW " Delete the first WORD
                            9W " Move 9 WORDS forward
                            D " Delete everything after the cursor
                            Ø " Count the number of regex matches on every line...
                            øø " Two hexadecimal characters in a row


                            Hexdump:



                            00000000: ce64 5739 5744 0dd8 f8f8 .dW9WD....





                            share|improve this answer












                            $endgroup$



















                              1
















                              $begingroup$


                              V (vim), 10 bytes



                              ÎdW9WD
                              Øøø


                              Try it online!



                              Explanation:



                              Î " On every line...
                              dW " Delete the first WORD
                              9W " Move 9 WORDS forward
                              D " Delete everything after the cursor
                              Ø " Count the number of regex matches on every line...
                              øø " Two hexadecimal characters in a row


                              Hexdump:



                              00000000: ce64 5739 5744 0dd8 f8f8 .dW9WD....





                              share|improve this answer












                              $endgroup$

















                                1














                                1










                                1







                                $begingroup$


                                V (vim), 10 bytes



                                ÎdW9WD
                                Øøø


                                Try it online!



                                Explanation:



                                Î " On every line...
                                dW " Delete the first WORD
                                9W " Move 9 WORDS forward
                                D " Delete everything after the cursor
                                Ø " Count the number of regex matches on every line...
                                øø " Two hexadecimal characters in a row


                                Hexdump:



                                00000000: ce64 5739 5744 0dd8 f8f8 .dW9WD....





                                share|improve this answer












                                $endgroup$




                                V (vim), 10 bytes



                                ÎdW9WD
                                Øøø


                                Try it online!



                                Explanation:



                                Î " On every line...
                                dW " Delete the first WORD
                                9W " Move 9 WORDS forward
                                D " Delete everything after the cursor
                                Ø " Count the number of regex matches on every line...
                                øø " Two hexadecimal characters in a row


                                Hexdump:



                                00000000: ce64 5739 5744 0dd8 f8f8 .dW9WD....






                                share|improve this answer















                                share|improve this answer




                                share|improve this answer



                                share|improve this answer








                                edited 7 hours ago

























                                answered 9 hours ago









                                DJMcMayhemDJMcMayhem

                                42.4k12 gold badges162 silver badges330 bronze badges




                                42.4k12 gold badges162 silver badges330 bronze badges
























                                    0
















                                    $begingroup$


                                    tcsh, 12 bytes





                                    xxd -r|wc -c


                                    Try it online!






                                    share|improve this answer










                                    $endgroup$



















                                      0
















                                      $begingroup$


                                      tcsh, 12 bytes





                                      xxd -r|wc -c


                                      Try it online!






                                      share|improve this answer










                                      $endgroup$

















                                        0














                                        0










                                        0







                                        $begingroup$


                                        tcsh, 12 bytes





                                        xxd -r|wc -c


                                        Try it online!






                                        share|improve this answer










                                        $endgroup$




                                        tcsh, 12 bytes





                                        xxd -r|wc -c


                                        Try it online!







                                        share|improve this answer













                                        share|improve this answer




                                        share|improve this answer



                                        share|improve this answer










                                        answered 8 hours ago









                                        Krzysztof SzewczykKrzysztof Szewczyk

                                        3,2901 gold badge9 silver badges23 bronze badges




                                        3,2901 gold badge9 silver badges23 bronze badges
























                                            0
















                                            $begingroup$


                                            Befunge-98 (FBBI), 16 bytes



                                            "c- cw|r- dxx"=@


                                            Try it online!






                                            share|improve this answer










                                            $endgroup$



















                                              0
















                                              $begingroup$


                                              Befunge-98 (FBBI), 16 bytes



                                              "c- cw|r- dxx"=@


                                              Try it online!






                                              share|improve this answer










                                              $endgroup$

















                                                0














                                                0










                                                0







                                                $begingroup$


                                                Befunge-98 (FBBI), 16 bytes



                                                "c- cw|r- dxx"=@


                                                Try it online!






                                                share|improve this answer










                                                $endgroup$




                                                Befunge-98 (FBBI), 16 bytes



                                                "c- cw|r- dxx"=@


                                                Try it online!







                                                share|improve this answer













                                                share|improve this answer




                                                share|improve this answer



                                                share|improve this answer










                                                answered 8 hours ago









                                                Krzysztof SzewczykKrzysztof Szewczyk

                                                3,2901 gold badge9 silver badges23 bronze badges




                                                3,2901 gold badge9 silver badges23 bronze badges
























                                                    0
















                                                    $begingroup$


                                                    05AB1E, 8 bytes



                                                    |εg51-}O


                                                    Try it online!



                                                    | get all input lines
                                                    ε for each line
                                                    g51- subtract 51 from length
                                                    }
                                                    O push the sum of the resulting list





                                                    share|improve this answer












                                                    $endgroup$










                                                    • 1




                                                      $begingroup$
                                                      Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
                                                      $endgroup$
                                                      – gadzooks02
                                                      9 hours ago










                                                    • $begingroup$
                                                      Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
                                                      $endgroup$
                                                      – Dorian
                                                      8 hours ago















                                                    0
















                                                    $begingroup$


                                                    05AB1E, 8 bytes



                                                    |εg51-}O


                                                    Try it online!



                                                    | get all input lines
                                                    ε for each line
                                                    g51- subtract 51 from length
                                                    }
                                                    O push the sum of the resulting list





                                                    share|improve this answer












                                                    $endgroup$










                                                    • 1




                                                      $begingroup$
                                                      Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
                                                      $endgroup$
                                                      – gadzooks02
                                                      9 hours ago










                                                    • $begingroup$
                                                      Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
                                                      $endgroup$
                                                      – Dorian
                                                      8 hours ago













                                                    0














                                                    0










                                                    0







                                                    $begingroup$


                                                    05AB1E, 8 bytes



                                                    |εg51-}O


                                                    Try it online!



                                                    | get all input lines
                                                    ε for each line
                                                    g51- subtract 51 from length
                                                    }
                                                    O push the sum of the resulting list





                                                    share|improve this answer












                                                    $endgroup$




                                                    05AB1E, 8 bytes



                                                    |εg51-}O


                                                    Try it online!



                                                    | get all input lines
                                                    ε for each line
                                                    g51- subtract 51 from length
                                                    }
                                                    O push the sum of the resulting list






                                                    share|improve this answer















                                                    share|improve this answer




                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited 8 hours ago

























                                                    answered 9 hours ago









                                                    DorianDorian

                                                    1,1664 silver badges6 bronze badges




                                                    1,1664 silver badges6 bronze badges










                                                    • 1




                                                      $begingroup$
                                                      Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
                                                      $endgroup$
                                                      – gadzooks02
                                                      9 hours ago










                                                    • $begingroup$
                                                      Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
                                                      $endgroup$
                                                      – Dorian
                                                      8 hours ago












                                                    • 1




                                                      $begingroup$
                                                      Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
                                                      $endgroup$
                                                      – gadzooks02
                                                      9 hours ago










                                                    • $begingroup$
                                                      Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
                                                      $endgroup$
                                                      – Dorian
                                                      8 hours ago







                                                    1




                                                    1




                                                    $begingroup$
                                                    Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
                                                    $endgroup$
                                                    – gadzooks02
                                                    9 hours ago




                                                    $begingroup$
                                                    Sorry, the input must contain the whole hexdump. (Yours skips the letters at the end of each line)
                                                    $endgroup$
                                                    – gadzooks02
                                                    9 hours ago












                                                    $begingroup$
                                                    Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
                                                    $endgroup$
                                                    – Dorian
                                                    8 hours ago




                                                    $begingroup$
                                                    Oh, my bad. I made this on my smartphone. Didn't see there's something behind the hex codes. I made a correction.
                                                    $endgroup$
                                                    – Dorian
                                                    8 hours ago











                                                    0
















                                                    $begingroup$


                                                    Japt -x, 5 bytes



                                                    Input as an array of lines.



                                                    ®Ê-51


                                                    Try it



                                                    ®Ê-51 :Implicit input of array
                                                    ® :Map
                                                    Ê : Length
                                                    -51 : Subtract 51
                                                    :Implicit output of sum of resulting array





                                                    share|improve this answer












                                                    $endgroup$














                                                    • $begingroup$
                                                      An explanation would be nice :)
                                                      $endgroup$
                                                      – gadzooks02
                                                      8 hours ago










                                                    • $begingroup$
                                                      Coming soon, @gadzooks02. But it's the same as the Jelly solution.
                                                      $endgroup$
                                                      – Shaggy
                                                      8 hours ago










                                                    • $begingroup$
                                                      @gadzooks02, explanation added.
                                                      $endgroup$
                                                      – Shaggy
                                                      7 hours ago















                                                    0
















                                                    $begingroup$


                                                    Japt -x, 5 bytes



                                                    Input as an array of lines.



                                                    ®Ê-51


                                                    Try it



                                                    ®Ê-51 :Implicit input of array
                                                    ® :Map
                                                    Ê : Length
                                                    -51 : Subtract 51
                                                    :Implicit output of sum of resulting array





                                                    share|improve this answer












                                                    $endgroup$














                                                    • $begingroup$
                                                      An explanation would be nice :)
                                                      $endgroup$
                                                      – gadzooks02
                                                      8 hours ago










                                                    • $begingroup$
                                                      Coming soon, @gadzooks02. But it's the same as the Jelly solution.
                                                      $endgroup$
                                                      – Shaggy
                                                      8 hours ago










                                                    • $begingroup$
                                                      @gadzooks02, explanation added.
                                                      $endgroup$
                                                      – Shaggy
                                                      7 hours ago













                                                    0














                                                    0










                                                    0







                                                    $begingroup$


                                                    Japt -x, 5 bytes



                                                    Input as an array of lines.



                                                    ®Ê-51


                                                    Try it



                                                    ®Ê-51 :Implicit input of array
                                                    ® :Map
                                                    Ê : Length
                                                    -51 : Subtract 51
                                                    :Implicit output of sum of resulting array





                                                    share|improve this answer












                                                    $endgroup$




                                                    Japt -x, 5 bytes



                                                    Input as an array of lines.



                                                    ®Ê-51


                                                    Try it



                                                    ®Ê-51 :Implicit input of array
                                                    ® :Map
                                                    Ê : Length
                                                    -51 : Subtract 51
                                                    :Implicit output of sum of resulting array






                                                    share|improve this answer















                                                    share|improve this answer




                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited 7 hours ago

























                                                    answered 8 hours ago









                                                    ShaggyShaggy

                                                    22.1k3 gold badges21 silver badges73 bronze badges




                                                    22.1k3 gold badges21 silver badges73 bronze badges














                                                    • $begingroup$
                                                      An explanation would be nice :)
                                                      $endgroup$
                                                      – gadzooks02
                                                      8 hours ago










                                                    • $begingroup$
                                                      Coming soon, @gadzooks02. But it's the same as the Jelly solution.
                                                      $endgroup$
                                                      – Shaggy
                                                      8 hours ago










                                                    • $begingroup$
                                                      @gadzooks02, explanation added.
                                                      $endgroup$
                                                      – Shaggy
                                                      7 hours ago
















                                                    • $begingroup$
                                                      An explanation would be nice :)
                                                      $endgroup$
                                                      – gadzooks02
                                                      8 hours ago










                                                    • $begingroup$
                                                      Coming soon, @gadzooks02. But it's the same as the Jelly solution.
                                                      $endgroup$
                                                      – Shaggy
                                                      8 hours ago










                                                    • $begingroup$
                                                      @gadzooks02, explanation added.
                                                      $endgroup$
                                                      – Shaggy
                                                      7 hours ago















                                                    $begingroup$
                                                    An explanation would be nice :)
                                                    $endgroup$
                                                    – gadzooks02
                                                    8 hours ago




                                                    $begingroup$
                                                    An explanation would be nice :)
                                                    $endgroup$
                                                    – gadzooks02
                                                    8 hours ago












                                                    $begingroup$
                                                    Coming soon, @gadzooks02. But it's the same as the Jelly solution.
                                                    $endgroup$
                                                    – Shaggy
                                                    8 hours ago




                                                    $begingroup$
                                                    Coming soon, @gadzooks02. But it's the same as the Jelly solution.
                                                    $endgroup$
                                                    – Shaggy
                                                    8 hours ago












                                                    $begingroup$
                                                    @gadzooks02, explanation added.
                                                    $endgroup$
                                                    – Shaggy
                                                    7 hours ago




                                                    $begingroup$
                                                    @gadzooks02, explanation added.
                                                    $endgroup$
                                                    – Shaggy
                                                    7 hours ago











                                                    0
















                                                    $begingroup$


                                                    Red, 81 bytes



                                                    func[s][n: 0 try[foreach l s[n: n + length? trim/all at take/part l 49 10]]n / 2]


                                                    Try it online!






                                                    share|improve this answer










                                                    $endgroup$



















                                                      0
















                                                      $begingroup$


                                                      Red, 81 bytes



                                                      func[s][n: 0 try[foreach l s[n: n + length? trim/all at take/part l 49 10]]n / 2]


                                                      Try it online!






                                                      share|improve this answer










                                                      $endgroup$

















                                                        0














                                                        0










                                                        0







                                                        $begingroup$


                                                        Red, 81 bytes



                                                        func[s][n: 0 try[foreach l s[n: n + length? trim/all at take/part l 49 10]]n / 2]


                                                        Try it online!






                                                        share|improve this answer










                                                        $endgroup$




                                                        Red, 81 bytes



                                                        func[s][n: 0 try[foreach l s[n: n + length? trim/all at take/part l 49 10]]n / 2]


                                                        Try it online!







                                                        share|improve this answer













                                                        share|improve this answer




                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered 7 hours ago









                                                        Galen IvanovGalen Ivanov

                                                        9,7571 gold badge14 silver badges41 bronze badges




                                                        9,7571 gold badge14 silver badges41 bronze badges
























                                                            0
















                                                            $begingroup$


                                                            C (gcc), 64 bytes





                                                            s[];f(r,l)r=0;while(*s=0,gets(s),l=strlen(s))r+=l-51;return r;


                                                            Try it online!






                                                            share|improve this answer










                                                            $endgroup$














                                                            • $begingroup$
                                                              You could use for.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago










                                                            • $begingroup$
                                                              Also, s[] seems to me to be unstable undefined behaviour.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago















                                                            0
















                                                            $begingroup$


                                                            C (gcc), 64 bytes





                                                            s[];f(r,l)r=0;while(*s=0,gets(s),l=strlen(s))r+=l-51;return r;


                                                            Try it online!






                                                            share|improve this answer










                                                            $endgroup$














                                                            • $begingroup$
                                                              You could use for.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago










                                                            • $begingroup$
                                                              Also, s[] seems to me to be unstable undefined behaviour.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago













                                                            0














                                                            0










                                                            0







                                                            $begingroup$


                                                            C (gcc), 64 bytes





                                                            s[];f(r,l)r=0;while(*s=0,gets(s),l=strlen(s))r+=l-51;return r;


                                                            Try it online!






                                                            share|improve this answer










                                                            $endgroup$




                                                            C (gcc), 64 bytes





                                                            s[];f(r,l)r=0;while(*s=0,gets(s),l=strlen(s))r+=l-51;return r;


                                                            Try it online!







                                                            share|improve this answer













                                                            share|improve this answer




                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered 5 hours ago









                                                            G. SliepenG. Sliepen

                                                            5202 silver badges6 bronze badges




                                                            5202 silver badges6 bronze badges














                                                            • $begingroup$
                                                              You could use for.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago










                                                            • $begingroup$
                                                              Also, s[] seems to me to be unstable undefined behaviour.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago
















                                                            • $begingroup$
                                                              You could use for.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago










                                                            • $begingroup$
                                                              Also, s[] seems to me to be unstable undefined behaviour.
                                                              $endgroup$
                                                              – Jonathan Frech
                                                              5 hours ago















                                                            $begingroup$
                                                            You could use for.
                                                            $endgroup$
                                                            – Jonathan Frech
                                                            5 hours ago




                                                            $begingroup$
                                                            You could use for.
                                                            $endgroup$
                                                            – Jonathan Frech
                                                            5 hours ago












                                                            $begingroup$
                                                            Also, s[] seems to me to be unstable undefined behaviour.
                                                            $endgroup$
                                                            – Jonathan Frech
                                                            5 hours ago




                                                            $begingroup$
                                                            Also, s[] seems to me to be unstable undefined behaviour.
                                                            $endgroup$
                                                            – Jonathan Frech
                                                            5 hours ago











                                                            0
















                                                            $begingroup$

                                                            Python 3, 48 bytes



                                                            f=lambda s:(len(s)or 51)+1-52*len(s.split('n'))


                                                            Input is passed as a string to the function f. The function increments the length of the input (including newlines), then subtracts 52 for each line.



                                                            Try it online






                                                            share|improve this answer










                                                            $endgroup$



















                                                              0
















                                                              $begingroup$

                                                              Python 3, 48 bytes



                                                              f=lambda s:(len(s)or 51)+1-52*len(s.split('n'))


                                                              Input is passed as a string to the function f. The function increments the length of the input (including newlines), then subtracts 52 for each line.



                                                              Try it online






                                                              share|improve this answer










                                                              $endgroup$

















                                                                0














                                                                0










                                                                0







                                                                $begingroup$

                                                                Python 3, 48 bytes



                                                                f=lambda s:(len(s)or 51)+1-52*len(s.split('n'))


                                                                Input is passed as a string to the function f. The function increments the length of the input (including newlines), then subtracts 52 for each line.



                                                                Try it online






                                                                share|improve this answer










                                                                $endgroup$



                                                                Python 3, 48 bytes



                                                                f=lambda s:(len(s)or 51)+1-52*len(s.split('n'))


                                                                Input is passed as a string to the function f. The function increments the length of the input (including newlines), then subtracts 52 for each line.



                                                                Try it online







                                                                share|improve this answer













                                                                share|improve this answer




                                                                share|improve this answer



                                                                share|improve this answer










                                                                answered 4 hours ago









                                                                IFcoltransGIFcoltransG

                                                                113 bronze badges




                                                                113 bronze badges
























                                                                    0
















                                                                    $begingroup$

                                                                    JavaScript (ES6), 34 bytes





                                                                    s=>(n=s.length)&&(n/68<<4)+n%68-51


                                                                    Try it online!



                                                                    Commented



                                                                    s => // s = input string
                                                                    (n = s.length) && // n = length of s; return 0 right away if n = 0 (special case)
                                                                    (n / 68 << 4) + // otherwise compute the number of full lines and multiply it by 16
                                                                    n % 68 - 51 // add the length of the last line minus 51





                                                                    share|improve this answer












                                                                    $endgroup$



















                                                                      0
















                                                                      $begingroup$

                                                                      JavaScript (ES6), 34 bytes





                                                                      s=>(n=s.length)&&(n/68<<4)+n%68-51


                                                                      Try it online!



                                                                      Commented



                                                                      s => // s = input string
                                                                      (n = s.length) && // n = length of s; return 0 right away if n = 0 (special case)
                                                                      (n / 68 << 4) + // otherwise compute the number of full lines and multiply it by 16
                                                                      n % 68 - 51 // add the length of the last line minus 51





                                                                      share|improve this answer












                                                                      $endgroup$

















                                                                        0














                                                                        0










                                                                        0







                                                                        $begingroup$

                                                                        JavaScript (ES6), 34 bytes





                                                                        s=>(n=s.length)&&(n/68<<4)+n%68-51


                                                                        Try it online!



                                                                        Commented



                                                                        s => // s = input string
                                                                        (n = s.length) && // n = length of s; return 0 right away if n = 0 (special case)
                                                                        (n / 68 << 4) + // otherwise compute the number of full lines and multiply it by 16
                                                                        n % 68 - 51 // add the length of the last line minus 51





                                                                        share|improve this answer












                                                                        $endgroup$



                                                                        JavaScript (ES6), 34 bytes





                                                                        s=>(n=s.length)&&(n/68<<4)+n%68-51


                                                                        Try it online!



                                                                        Commented



                                                                        s => // s = input string
                                                                        (n = s.length) && // n = length of s; return 0 right away if n = 0 (special case)
                                                                        (n / 68 << 4) + // otherwise compute the number of full lines and multiply it by 16
                                                                        n % 68 - 51 // add the length of the last line minus 51






                                                                        share|improve this answer















                                                                        share|improve this answer




                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        edited 2 hours ago

























                                                                        answered 5 hours ago









                                                                        ArnauldArnauld

                                                                        94.6k7 gold badges111 silver badges384 bronze badges




                                                                        94.6k7 gold badges111 silver badges384 bronze badges
























                                                                            0
















                                                                            $begingroup$


                                                                            Retina 0.8.2, 8 bytes



                                                                            .51

                                                                            .


                                                                            Try it online! Explanation:



                                                                            .51


                                                                            Delete the first 51 characters of each line. (Lines can only have between 52 and 67 characters, so this always matches once per line.)



                                                                            .


                                                                            Count the remaining non-newline characters.






                                                                            share|improve this answer










                                                                            $endgroup$



















                                                                              0
















                                                                              $begingroup$


                                                                              Retina 0.8.2, 8 bytes



                                                                              .51

                                                                              .


                                                                              Try it online! Explanation:



                                                                              .51


                                                                              Delete the first 51 characters of each line. (Lines can only have between 52 and 67 characters, so this always matches once per line.)



                                                                              .


                                                                              Count the remaining non-newline characters.






                                                                              share|improve this answer










                                                                              $endgroup$

















                                                                                0














                                                                                0










                                                                                0







                                                                                $begingroup$


                                                                                Retina 0.8.2, 8 bytes



                                                                                .51

                                                                                .


                                                                                Try it online! Explanation:



                                                                                .51


                                                                                Delete the first 51 characters of each line. (Lines can only have between 52 and 67 characters, so this always matches once per line.)



                                                                                .


                                                                                Count the remaining non-newline characters.






                                                                                share|improve this answer










                                                                                $endgroup$




                                                                                Retina 0.8.2, 8 bytes



                                                                                .51

                                                                                .


                                                                                Try it online! Explanation:



                                                                                .51


                                                                                Delete the first 51 characters of each line. (Lines can only have between 52 and 67 characters, so this always matches once per line.)



                                                                                .


                                                                                Count the remaining non-newline characters.







                                                                                share|improve this answer













                                                                                share|improve this answer




                                                                                share|improve this answer



                                                                                share|improve this answer










                                                                                answered 2 hours ago









                                                                                NeilNeil

                                                                                89.7k8 gold badges46 silver badges188 bronze badges




                                                                                89.7k8 gold badges46 silver badges188 bronze badges
























                                                                                    0
















                                                                                    $begingroup$


                                                                                    Perl 6, 18 bytes





                                                                                    .join.comb-51*$_


                                                                                    Try it online!



                                                                                    Anonymous Whatever lambda that takes a list of lines and returns the sum of the number of characters, subtracting 51 for each line






                                                                                    share|improve this answer












                                                                                    $endgroup$



















                                                                                      0
















                                                                                      $begingroup$


                                                                                      Perl 6, 18 bytes





                                                                                      .join.comb-51*$_


                                                                                      Try it online!



                                                                                      Anonymous Whatever lambda that takes a list of lines and returns the sum of the number of characters, subtracting 51 for each line






                                                                                      share|improve this answer












                                                                                      $endgroup$

















                                                                                        0














                                                                                        0










                                                                                        0







                                                                                        $begingroup$


                                                                                        Perl 6, 18 bytes





                                                                                        .join.comb-51*$_


                                                                                        Try it online!



                                                                                        Anonymous Whatever lambda that takes a list of lines and returns the sum of the number of characters, subtracting 51 for each line






                                                                                        share|improve this answer












                                                                                        $endgroup$




                                                                                        Perl 6, 18 bytes





                                                                                        .join.comb-51*$_


                                                                                        Try it online!



                                                                                        Anonymous Whatever lambda that takes a list of lines and returns the sum of the number of characters, subtracting 51 for each line







                                                                                        share|improve this answer















                                                                                        share|improve this answer




                                                                                        share|improve this answer



                                                                                        share|improve this answer








                                                                                        edited 27 mins ago

























                                                                                        answered 34 mins ago









                                                                                        Jo KingJo King

                                                                                        32.6k4 gold badges73 silver badges142 bronze badges




                                                                                        32.6k4 gold badges73 silver badges142 bronze badges































                                                                                            draft saved

                                                                                            draft discarded















































                                                                                            If this is an answer to a challenge…



                                                                                            • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                                                            • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                                              Explanations of your answer make it more interesting to read and are very much encouraged.


                                                                                            • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                                                                            More generally…



                                                                                            • …Please make sure to answer the question and provide sufficient detail.


                                                                                            • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                                                                            draft saved


                                                                                            draft discarded














                                                                                            StackExchange.ready(
                                                                                            function ()
                                                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f194040%2fcode-golf-measurer-2019%23new-answer', 'question_page');

                                                                                            );

                                                                                            Post as a guest















                                                                                            Required, but never shown





















































                                                                                            Required, but never shown














                                                                                            Required, but never shown












                                                                                            Required, but never shown







                                                                                            Required, but never shown

































                                                                                            Required, but never shown














                                                                                            Required, but never shown












                                                                                            Required, but never shown







                                                                                            Required, but never shown









                                                                                            Popular posts from this blog

                                                                                            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                                                                                            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                                                                                            Tom Holland Mục lục Đầu đời và giáo dục | Sự nghiệp | Cuộc sống cá nhân | Phim tham gia | Giải thưởng và đề cử | Chú thích | Liên kết ngoài | Trình đơn chuyển hướngProfile“Person Details for Thomas Stanley Holland, "England and Wales Birth Registration Index, 1837-2008" — FamilySearch.org”"Meet Tom Holland... the 16-year-old star of The Impossible""Schoolboy actor Tom Holland finds himself in Oscar contention for role in tsunami drama"“Naomi Watts on the Prince William and Harry's reaction to her film about the late Princess Diana”lưu trữ"Holland and Pflueger Are West End's Two New 'Billy Elliots'""I'm so envious of my son, the movie star! British writer Dominic Holland's spent 20 years trying to crack Hollywood - but he's been beaten to it by a very unlikely rival"“Richard and Margaret Povey of Jersey, Channel Islands, UK: Information about Thomas Stanley Holland”"Tom Holland to play Billy Elliot""New Billy Elliot leaving the garage"Billy Elliot the Musical - Tom Holland - Billy"A Tale of four Billys: Tom Holland""The Feel Good Factor""Thames Christian College schoolboys join Myleene Klass for The Feelgood Factor""Government launches £600,000 arts bursaries pilot""BILLY's Chapman, Holland, Gardner & Jackson-Keen Visit Prime Minister""Elton John 'blown away' by Billy Elliot fifth birthday" (video with John's interview and fragments of Holland's performance)"First News interviews Arrietty's Tom Holland"“33rd Critics' Circle Film Awards winners”“National Board of Review Current Awards”Bản gốc"Ron Howard Whaling Tale 'In The Heart Of The Sea' Casts Tom Holland"“'Spider-Man' Finds Tom Holland to Star as New Web-Slinger”lưu trữ“Captain America: Civil War (2016)”“Film Review: ‘Captain America: Civil War’”lưu trữ“‘Captain America: Civil War’ review: Choose your own avenger”lưu trữ“The Lost City of Z reviews”“Sony Pictures and Marvel Studios Find Their 'Spider-Man' Star and Director”“‘Mary Magdalene’, ‘Current War’ & ‘Wind River’ Get 2017 Release Dates From Weinstein”“Lionsgate Unleashing Daisy Ridley & Tom Holland Starrer ‘Chaos Walking’ In Cannes”“PTA's 'Master' Leads Chicago Film Critics Nominations, UPDATED: Houston and Indiana Critics Nominations”“Nominaciones Goya 2013 Telecinco Cinema – ENG”“Jameson Empire Film Awards: Martin Freeman wins best actor for performance in The Hobbit”“34th Annual Young Artist Awards”Bản gốc“Teen Choice Awards 2016—Captain America: Civil War Leads Second Wave of Nominations”“BAFTA Film Award Nominations: ‘La La Land’ Leads Race”“Saturn Awards Nominations 2017: 'Rogue One,' 'Walking Dead' Lead”Tom HollandTom HollandTom HollandTom Hollandmedia.gettyimages.comWorldCat Identities300279794no20130442900000 0004 0355 42791085670554170004732cb16706349t(data)XX5557367