Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
It is true that a chess engine tends to use a great amount of memory for its hash to store generated moves (of which there are tipically tens of millions). On the other hand once started it never 'sleeps' so consumes CPU resources as well - all the way long.

Still: lowering the priority of the engine process has worked for me. Now I can open web pages even play online with the engine running in the background.

In reply to Re^2: Set thread quantum for process under Windows by chessgui
in thread Set thread quantum for process under Windows by chessgui

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [ovedpo15]: another question about regex. if I have a string like this: "a/b/,c/d/e,5" I would like to remove the string after the last comma so the output will be "a/b/,c/d/e" how to do so?
    [Corion]: ovedpo15: You could split on comma, and then join everything together, except the last part. Or you could match and make sure that the last part has no comma, like qr!,[^,]+$!, or you could use rindex.
    [ovedpo15]: But I don't know the length of the string. will it still work?
    [ovedpo15]: The only thing I know is that there is a comma at the end and a value after that
    [hippo]: Try it and see. Your computer won't explode.
    [Corion]: length will tell you the length of a string.
    [Corion]: But if you are parsing CSV, again, let me point to Text::CSV_XS, which you should use instead
    [hippo]: +1 for Text::CSV_XS
    [ovedpo15]: Im not allowed to use additional modules, so I can't use it. looking for a simple regex to do this task though..

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (9)
    As of 2018-05-27 10:36 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?