Coder Social home page Coder Social logo

In what ways does yarer support RPN? about yarer HOT 3 OPEN

davassi avatar davassi commented on September 28, 2024 1
In what ways does yarer support RPN?

from yarer.

Comments (3)

xpe avatar xpe commented on September 28, 2024 1

I heard about your project from This Week in Rust and it got my interest. πŸ’‘

I'm here because the same confusion mentioned above jumped out at me as well. The above commenter (lunasophia) used a kind, curious phrasing which is all-too-often missing in Internet discussions, so kudos to them!

Caveats

I'm writing this because the Internet can seem to be a harsh place, and I don't want to contribute to that tone. So, I would like to add the following feedback, which I hope you can take in the spirit of editorial feedback described here

Writing is a vulnerable process. It’s something most of us do by ourselves, and after months or years of poring over a draft, the pages can start to feel like an extension of you as the writer. / It’s no wonder, then, that receiving a lengthy editorial letter filled with constructive criticism is difficult for some authors to swallow. They may perceive negative comments as an attack, even when the editor is delivering feedback that will ultimately improve the story.

I'm aware that I'm neither a professional editor nor your editor, but I hope my comments are useful nonetheless:

Editor-Style Feedback

When a reader first reads this they are likely to have cognitive dissonance for the reasons mentioned above:

Yarer (Yet another (Rusty || Rpn) expression resolver) is a flexible library,
written in Rust, for the processing, compilation and evaluation of
mathematical expressions using Reverse Polish Notation.

Example of usage of the library:
let session = Session::init();
let mut resolver = session.process("atan(cos(10+e)+3*sin(9/3))^2");

println!("The result is {}", resolver.resolve());

Such confusion can result in some people 'bouncing off' the README (and thus not giving it a try) or thinking less of it. We don't want that. I want all good open source projects to get their due consideration and be put to good use.

You only get a chance to make a first impression once. I think it would benefit you and your project to iterate on the README until it is perfectly clear what your library does.

Bottom line: thanks for creating this, sharing it, and opening yourself up to feedback.

from yarer.

davassi avatar davassi commented on September 28, 2024

Hi @lunasophia, thanks for pointing this out, sorry for the confusion. Yarer uses RPN internally to resolve and evaluate a mathematical expression, transforming it first from INFIX notation to RPN notation using the Shunting Yard algorithm. Essentially, it takes an infix notation as input and first transforms it into a postfix using the RpnResolver::reverse_polish_notation, and then resolves it using RpnResolver::resolve. About the CLI tool, you can start yarer as an executable, and feed it with infix notation math expressions, and it will resolve the expressions like GNU bc. Actually, it might be an interesting use-case to set a flag to allow only post-fix notation expressions to be evaluated. Hope this clarifies things.

from yarer.

davassi avatar davassi commented on September 28, 2024

@xpe Sorry for the late reply, I really and truly appreciate (and am impressed by) your deeply explained introduction and the problems you've pointed out. But, speaking for myself in the first person, I actually asked for feedback (as it's the best way to get sharp skills) so no need to be so diplomatic! I've changed the README to a much simpler form of communication. Hope this is better. Please feel free to contact me at [email protected], would love to have a chat!

from yarer.

Related Issues (1)

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.