GithubHelp home page GithubHelp logo

Error: improper code about mathb HOT 5 CLOSED

sergeevabc avatar sergeevabc commented on August 29, 2024
Error: improper code

from mathb.

Comments (5)

enzotib avatar enzotib commented on August 29, 2024 1

You lucky, I waited more than two months to get an answer I already found by myself

from mathb.

susam avatar susam commented on August 29, 2024

Hi @sergeevabc, The online service running at https://mathb.in/ expects the input code to contain some LaTeX mathematics delimiter. When no such delimiter is found, an error is returned. See also #29.

from mathb.

sergeevabc avatar sergeevabc commented on August 29, 2024

@susam, it is NOT obvious, consider adding a tip or, at least, a more meaningful error message. For example, the frontpage says Mathbin is for math snippets. Okay, let's expand 'lorem ipsum' (looks proper Markdown to me) with '2+2=4' (not LaTeX, still proper math), yet 'Improper code' error again.

Otherwise, one has to use hacks like @enzotib did.

from mathb.

susam avatar susam commented on August 29, 2024

Hi @sergeevabc, Thank you for the feedback. There are currently mainly two reasons why the error message for this specific error is unclear.

  • The error message (see https://github.com/susam/mathb/blob/b15f3c8/mathb.lisp#L439-L440) is not configurable. However, the condition for generating this error message is configurable via the :expect configuration option documented at https://github.com/susam/mathb#runtime-options. For example, the live instance running at https://mathb.in/ is configured to generate this error when LaTeX delimiters are missing. However, someone else running a separate instance of MathB may configure it to generate an error when a different set of tokens is missing from the post. It is also possible to configure MathB to not generate this error at all.

  • Keeping the error message unclear also reduces drive-by spamming to some extent. Pastebins like this face significant spamming problem. The measures to discourage spam in MathB.in have evolved over many years. The "improper code" error message was one of the things that had a positive correlation with reduced spam.

I have to admit though that these are really mundane reasons for keeping an unclear message. A clearer error message will certainly be helpful to genuine authors of a post. The unclear error message can indeed be frustrating. The error message can definitely be made configurable, so that as one configures the :expect option, they can configure the corresponding error message too. However, this is a volunteer driven open source project and this particular issue is not a high priority issue for me. If someone else is strongly motivated to resolve this issue, a pull request or patch is very welcome.

from mathb.

susam avatar susam commented on August 29, 2024

Hi @enzotib, Sorry, it took so long for you to get an answer when you reported this issue earlier at #29. I maintain this project in my spare time and there are some months when I am too busy to devote any time to this project. I do respond to messages when I can, based on how much spare time I have and how I want to spend that spare time. I know this is not ideal for someone stuck due to an unclear error message. I'd love for their to be more volunteers who could help out with the issues and questions being submitted. However, the fact is that this is a small project with not many volunteers, so the time to respond to new issues and questions can be rather long.

from mathb.

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.