ArithEval v0.5.0 released

2018-01-07 Thread Dechcaudron via Digitalmars-d-announce
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.


Re: ArithEval v0.5.0 released

2018-01-07 Thread angel via Digitalmars-d-announce

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 !


Re: ArithEval v0.5.0 released

2018-01-07 Thread thedeemon via Digitalmars-d-announce

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!




Re: ArithEval v0.5.0 released

2018-01-08 Thread Dechcaudron via Digitalmars-d-announce

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?


Re: ArithEval v0.5.0 released

2018-01-08 Thread rjframe via Digitalmars-d-announce
On Mon, 08 Jan 2018 09:53:22 +, 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.


Re: ArithEval v0.5.0 released

2018-01-09 Thread Dechcaudron via Digitalmars-d-announce

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.


Re: ArithEval v0.5.0 released

2018-01-09 Thread bachmeier via Digitalmars-d-announce

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.


Re: ArithEval v0.5.0 released

2018-01-09 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Jan 09, 2018 at 10:32:33PM +, 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