Giter VIP home page Giter VIP logo

Comments (5)

blefloch avatar blefloch commented on May 19, 2024

There are some similar (docstripped-out) lines in l3regex (search trace) that are completely unused now. Perhaps to keep code readable it would make sense to keep the tracing code outside the definitions: make it patch the definition when debug is turned on. Taking an excessively low-level function \int_set:Nn to show what I mean:

\debug_patch:nnw
  {
    \debug_term:n { Start~of~\tl_to_str:n { \int_set:Nn #1 { #2 } } }
  }
  {
    \debug_term:n { Done~setting~\token_to_str:N #1~to~\int_use:N #1 }
  }
\cs_new_protected:Npn \int_set:Nn #1#2
  { #1 = \__int_eval:w #2 \__int_eval_end: }

The first and second arguments of \debug_patch:nnw would be added before and after the definition of \int_set:Nn when debug is turned on. Of course, \debug_patch:nnw would have to look ahead at what \cs_new-like function follows.

from l3build.

wspr avatar wspr commented on May 19, 2024

from l3build.

blefloch avatar blefloch commented on May 19, 2024

See recent commits (I forgot to point here from them). For practice, I'll try to use in l3regex the \__debug_patch:nnNw function I've now added.

from l3build.

josephwright avatar josephwright commented on May 19, 2024

Is this still relevant at the l3build end?

from l3build.

wspr avatar wspr commented on May 19, 2024

I think so, yes — my original intention was to bring this up as part of the l3build lua code, and Bruno started discussing more broadly.

I’ll try to prototype something and see how you like the look of it...

from l3build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.