Re: [dev] [sbase][PATCH] Add factor(1)

From: Marc Collin <marc.collin7_AT_gmail.com>
Date: Fri, 26 Feb 2016 11:40:51 -0300

A contributor already started working on a suckless bignum library[0]
to use on his bc(1) candidate for sbase[1].
Mattias maybe you want to work on that instead of starting from
scratch. Duplicating efforts is usually not good when all have the
same goal (suckless bignum, dc and bc).

[0] https://github.com/suiginsoft/hebimath
[1] https://github.com/suiginsoft/bc

On Fri, Feb 26, 2016 at 9:11 AM, Mattias Andrée <maandree_AT_kth.se> wrote:
> On Fri, 26 Feb 2016 11:55:12 +0000
> Dimitris Papastamos <sin_AT_2f30.org> wrote:
>
>> On Fri, Feb 26, 2016 at 12:45:27PM +0100, Mattias Andrée
>> wrote:
>> > On Fri, 26 Feb 2016 11:39:07 +0000
>> > Dimitris Papastamos <sin_AT_2f30.org> wrote:
>> >
>> > > On Fri, Feb 26, 2016 at 12:33:37PM +0100, Mattias
>> > > Andrée wrote:
>> > > > On Fri, 26 Feb 2016 11:31:31 +0000
>> > > > Dimitris Papastamos <sin_AT_2f30.org> wrote:
>> > > >
>> > > > > On Fri, Feb 26, 2016 at 12:28:32PM +0100, Mattias
>> > > > > Andrée wrote:
>> > > > > > On Fri, 26 Feb 2016 11:26:15 +0000
>> > > > > > Dimitris Papastamos <sin_AT_2f30.org> wrote:
>> > > > > >
>> > > > > > > On Fri, Feb 26, 2016 at 12:19:32PM +0100,
>> > > > > > > Mattias Andrée wrote:
>> > > > > > > > On Fri, 26 Feb 2016 10:07:31 +0000
>> > > > > > > > Dimitris Papastamos <sin_AT_2f30.org> wrote:
>> > > > > > > >
>> > > > > > > > > On Fri, Feb 26, 2016 at 09:47:14AM +0100,
>> > > > > > > > > Mattias Andrée wrote:
>> > > > > > > > > > On Fri, 26 Feb 2016 09:43:02 +0100
>> > > > > > > > > > FRIGN <dev_AT_frign.de> wrote:
>> > > > > > > > > >
>> > > > > > > > > > > On Fri, 26 Feb 2016 09:37:12 +0100
>> > > > > > > > > > > Mattias Andrée <maandree_AT_kth.se>
>> > > > > > > > > > > wrote:
>> > > > > > > > > > >
>> > > > > > > > > > > Hey Mattias,
>> > > > > > > > > > >
>> > > > > > > > > > > > Mostly random things, but regularly
>> > > > > > > > > > > > when I correct maths
>> > > > > > > > > > > > tests.
>> > > > > > > > > > >
>> > > > > > > > > > > do the primes you ask your students to
>> > > > > > > > > > > study fit in 64 bits?
>> > > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > Yes. But sometimes the primes I factor
>> > > > > > > > > > do not.
>> > > > > > > > >
>> > > > > > > > > Write a dc(1) script!
>> > > > > > >
>> > > > > > > man dc
>> > > > > > >
>> > > > > >
>> > > > > > I know, but why?
>> > > > >
>> > > > > Because it can already handle arbitrary precision
>> > > > > arithmetic.
>> > > > >
>> > > >
>> > > > I'm lost. Do you think factor(1) shall be
>> > > > implemented as a dc(1) script in sbase?
>> > >
>> > > No, as I already mentioned earlier, I don't want
>> > > factor(1) in sbase at this point in time. We can
>> > > revisit this when we have a dc implementation.
>> > >
>> > > This was just a suggestion at an alternative way of
>> > > implementing factor by just relying on existing POSIX
>> > > utilities and without having to implement your own
>> > > bignum code.
>> > >
>> >
>> > How are you going to implement dc without writing your
>> > own bignum code? Either, we use an existing bignum,
>> > write our own, or do not implement either of factor(1),
>> > dc(1), and bc(1). And if we are not going to implement
>> > them, then GNU factor will do.
>> >
>>
>> dc is a general purpose language, factor isn't. If you
>> want to focus on something more meaningful for sbase,
>> consider writing a small bignum library that can be used
>> with the future sbase dc. We can then decide if factor
>> should be implemented on top of dc or using this bignum
>> library.
>
> I just started.
>
>>
>> In any case, dc is a needed utility for sbase, factor
>> isn't so I can provide no promises on factor inclusion.
>>
>
Received on Fri Feb 26 2016 - 15:40:51 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 26 2016 - 15:48:11 CET