Coder Social home page Coder Social logo

kexpr-nim's Introduction

kexpr-nim

nim wrapper for Heng Li's kexpr math expression library

badge

var e = expression("5*6+x > 20")
e["x"] = 10
echo e.int
e["x"] = 20
echo e.int64
assert e.error() == 0

e = expression("(sample1 > 20 & sample2 > 10 & sample3 < 40")
# missing paren
assert e.error() != 0
e.clear()

e = expression("(sample1 > 20) & (sample2 > 10) & (sample3 < 40)")
e["sample1"] = 21; e["sample2"] = 65; e["sample3"] = 20
echo e.int # 1
e["sample1"] = 0
echo e.int # 0
assert e.error() == 0
echo e.float # 0.0

installation

If you have nimble installed you can do:

nimble install kexpr

nimble

kexpr-nim's People

Contributors

brentp avatar smoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

smoe

kexpr-nim's Issues

Copyright information - should this possibly be more specific? Pointer to original kexpr?

Hello,

Everything builds and tests nicely. So you are providing a complete package, i.e. are including what you wrapped.
You are wrapping something that I had expected to find somewhere on
https://github.com/lh3
together with the original license - but I failed. So, is it all yours since you reimplemented it? But why then say you wrapped someone else's work? Please kindly help your README.md / LICENSE file to clear this up and/or add a short header in kexpr/*.[ch].

Many thanks
Steffen

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.