www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - ArithEval v0.5.0 released

reply Dechcaudron <no-reply no-email.com> writes:
Updating this library I coded more than a year ago, so that I 
could use it as an optional dependency of the coming up dli 
library.

It allows the runtime evaluation of simple math expressions like 
`1 + 2 * 3` or `1 ^ foo`, with foo being given values at run time.

It was never announced in this forum, so it is likely most of you 
never heard of it. The README pretty much sums up all there is to 
see, but do let me know if you guys have any specific doubt. 
Feedback is greatly appreciated.
Jan 07 2018
next sibling parent angel <andrey.gelman gmail.com> writes:
On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote:
 Updating this library I coded more than a year ago, so that I 
 could use it as an optional dependency of the coming up dli 
 library.

 It allows the runtime evaluation of simple math expressions 
 like `1 + 2 * 3` or `1 ^ foo`, with foo being given values at 
 run time.

 It was never announced in this forum, so it is likely most of 
 you never heard of it. The README pretty much sums up all there 
 is to see, but do let me know if you guys have any specific 
 doubt. Feedback is greatly appreciated.
Very cool !
Jan 07 2018
prev sibling parent reply thedeemon <dlang thedeemon.com> writes:
On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote:
 It allows the runtime evaluation of simple math expressions 
 like `1 + 2 * 3` or `1 ^ foo`, with foo being given values at 
 run time.
That's a nice exercise in using Pegged. Reminds me of another Pegged-based calculator with variables, more operations, more precision and more permissive license: http://code.dlang.org/packages/pc It hasn't been updated in 4 years but still can be built by Dub automatically, that's how stable D is these days!
Jan 07 2018
parent reply Dechcaudron <no-reply no-email.com> writes:
On Monday, 8 January 2018 at 06:02:35 UTC, thedeemon wrote:
 On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote:
 It allows the runtime evaluation of simple math expressions 
 like `1 + 2 * 3` or `1 ^ foo`, with foo being given values at 
 run time.
That's a nice exercise in using Pegged. Reminds me of another Pegged-based calculator with variables, more operations, more precision and more permissive license: http://code.dlang.org/packages/pc It hasn't been updated in 4 years but still can be built by Dub automatically, that's how stable D is these days!
From what I can see (documentation appears to be scarce) pc strived to be more like a Matlab-style program. ArithEval is to be used as a library to help deal with user input. But the former definitely supports many more operations, you are right. I guess it would not hurt to change the license to MIT. Would that encourage use by the community?
Jan 08 2018
parent reply rjframe <dlang ryanjframe.com> writes:
On Mon, 08 Jan 2018 09:53:22 +0000, Dechcaudron wrote:

 I guess it would not hurt
 to change the license to MIT. Would that encourage use by the community?
Choosing the license really comes down to what you want to see with the code; if you want to maintain control and ensure that people modifying it make those changes available, the GPL is fine (but yes, it will reduce the number of people willing to use it). If you primarily just want to know that people who would find it useful might pick it up and use it, a more permissive license would help. But don't let anyone peer-pressure you into changing licenses. Figure out your goals and license your code accordingly.
Jan 08 2018
next sibling parent Dechcaudron <no-reply no-email.com> writes:
On Monday, 8 January 2018 at 11:45:25 UTC, rjframe wrote:
 But don't let anyone peer-pressure you into changing licenses. 
 Figure out your goals and license your code accordingly.
Your opinion is much appreciated. For this particular project, MIT will do just fine.
Jan 09 2018
prev sibling parent reply bachmeier <no spam.net> writes:
On Monday, 8 January 2018 at 11:45:25 UTC, rjframe wrote:
 But don't let anyone peer-pressure you into changing licenses. 
 Figure out your goals and license your code accordingly.
The main cost of using the GPL is that the anti-GPL zealots will post messages telling you to change the license because the GPL is not sufficiently pure. I'm old enough to remember when it was FSF members that constantly bothered developers to conform to their philosophy.
Jan 09 2018
parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Tue, Jan 09, 2018 at 10:32:33PM +0000, bachmeier via Digitalmars-d-announce
wrote:
 On Monday, 8 January 2018 at 11:45:25 UTC, rjframe wrote:
 But don't let anyone peer-pressure you into changing licenses.
 Figure out your goals and license your code accordingly.
The main cost of using the GPL is that the anti-GPL zealots will post messages telling you to change the license because the GPL is not sufficiently pure. I'm old enough to remember when it was FSF members that constantly bothered developers to conform to their philosophy.
In the old days, it was the GPL that was considered most pure, and the other licenses were considered to be "compromising" with the proprietary. How the times have changed. T -- The most powerful one-line C program: #include "/dev/tty" -- IOCCC
Jan 09 2018